捆绑包名称和捆绑包显示名称 [英] Bundle Name and Bundle Display Name

查看:55
本文介绍了捆绑包名称和捆绑包显示名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已经问过关于Bundle Name和Bundle Display Name的类似问题,例如:

Similar question about Bundle Name and Bundle Display Name have been asked, such as:

有什么区别在捆绑显示名称"之间和捆绑名称"在可可应用程序的信息列表中

但到目前为止,我还没有读到关于何时需要同时使用它们、何时可以以不同方式指定它们等的非常简洁的答案.

but so far I have not read a very good succinct answer on when you need to use them both, when they may be specified differently, and so on.

文档似乎表明 bundle display name 只有在您进行本地化时才有用,如果您在没有本地化时指定它可能会影响性能.

The documentation seems to suggest that bundle display name is only useful if you have localization and may hurt performance if you specify it when you don't have localization.

有人能一劳永逸地解决这些问题吗?

Can someone clear these issues once and for all?

Apple 的文档

CFBundleName (String - iOS, Mac OS X) 标识捆.此名称的长度应少于 16 个字符,并且适合显示在菜单栏和应用程序的信息中窗户.您可以将此键包含在 InfoPlist.strings 文件中适当的 .lproj 子目录为其提供本地化值.如果您本地化此密钥,您还应该包括该密钥CFBundleDisplayName."

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(字符串 - iOS、Mac OS X)指定包的显示名称.如果您支持捆绑包的本地化名称,在您的信息属性列表文件和您的语言子目录的 InfoPlist.strings 文件.如果你本地化这个键,你还应该包括一个本地化的版本CFBundleName 键.

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.

如果您不打算本地化您的包,请不要包含此密钥在您的 Info.plist 文件中.包含此键不会影响显示包名称但确实会导致性能损失搜索此密钥的本地化版本.

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.

在显示包的本地化名称之前,Finder将此键的值与包的实际名称进行比较在文件系统中.如果两个名称匹配,则 Finder 继续显示来自相应 InfoPlist.strings 文件的本地化名称你的捆绑包.如果名称不匹配,Finder 会显示文件系统名称.

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 用于更改设备(和模拟器)上的应用程序图标下方的文本.是的,这应该是本地化的,但编辑它或让它说出你想要的任何内容并没有明显的性能损失.

CFBundleDisplayName is for changing the text below the app icon on your device (and simulator). Yes this is supposed to be localized but there's no tangible penalty in performance to editing it or making it say whatever you want.

要编辑它,您可以更改项目中信息"下的捆绑显示名称:

To edit this, you can change the "Bundle display name under "info" in the project:

CFBundleName 不是线索.我无法弄清楚这是什么变化或为什么.

CFBundleName not a clue. I can't figure out what this changes or why.

这篇关于捆绑包名称和捆绑包显示名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆