加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

xcode – 软件包名称和软件包显示名称

发布时间:2020-12-14 19:46:41 所属栏目:百科 来源:网络整理
导读:有关Bundle Name和Bundle显示名称的类似问题已被询问,例如: What’s the difference between “bundle display name” and “bundle name” in cocoa application’s info plist 但到目前为止,我还没有看到一个很好的简明扼要的答案,当你需要使用它们时,可
有关Bundle Name和Bundle显示名称的类似问题已被询问,例如:

What’s the difference between “bundle display name” and “bundle name” in cocoa application’s info plist

但到目前为止,我还没有看到一个很好的简明扼要的答案,当你需要使用它们时,可以指定不同,等等.

文档似乎表明,捆绑显示名称仅在您具有本地化功能时有用,如果在没有本地化的情况下指定它,可能会损害性能.

有人可以一劳永逸地清除这些问题吗?

苹果文档

CFBundleName (String – iOS,Mac OS X) identifies the short name of the
bundle. This name should be less than 16 characters long and be
suitable for displaying in the menu bar and the application’s Info
window. You can include this key in the InfoPlist.strings file of an
appropriate .lproj subdirectory to provide localized values for it. If
you localize this key,you should also include the key
“CFBundleDisplayName.”

CFBundleDisplayName (String – iOS,Mac OS X) specifies the display name of the bundle. If you support localized names for your bundle,
include this key in both your information property list file and in
the InfoPlist.strings files of your language subdirectories. If you
localize this key,you should also include a localized version of the
CFBundleName key.

If you do not intend to localize your bundle,do not include this key
in your Info.plist file. Inclusion of this key does not affect the
display of the bundle name but does incur a performance penalty to
search for localized versions of this key.

Before displaying a localized name for your bundle,the Finder
compares the value of this key against the actual name of your bundle
in the file system. If the two names match,the Finder proceeds to
display the localized name from the appropriate InfoPlist.strings file
of your bundle. If the names do not match,the Finder displays the
file-system name.

解决方法

CFBundleDisplayName用于更改设备(和模拟器)上的应用程序图标下方的文本.是的,这应该是本地化的,但是在编辑它或使它说任何你想要的表现没有明确的惩罚.

要编辑这个,您可以在项目中的“信息”下更改“捆绑显示名称”:

CFBundleName不是一个线索.我不知道这是什么变化或为什么.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读