包 ID 区分大小写吗?
在配置文件中,我将应用程序 ID 设置为 com.mycompany.lowercaseappname
,但在 Xcode 4 中,捆绑包标识符会自动配置为使用我的 ${PRODUCT_NAME}
,即大写(我希望用户在应用程序图标下看到它大写)。这样可以吗?还是我需要在 Xcode 中手动将包 ID 更改为小写?
In a provisioning profile I set my app id to com.mycompany.lowercaseappname
, but in Xcode 4 the bundle identifier is auto configured to use my ${PRODUCT_NAME}
, which is capitalized (I want the user to see it capitalized under the app icon). Is this ok or do I need to change the bundle id manually in Xcode to lower case?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
捆绑包 ID 区分大小写。来自 Apple 文档:
请注意,捆绑包 ID 并不是用户将看到的应用程序名称。这就是“捆绑包显示名称”
The bundle ID is case sensitive. From the Apple Docs:
Note that the bundle ID is not what the user will see as the app name. That's the "Bundle Display Name"
包标识符必须是全局唯一的(不与世界上任何其他应用程序匹配),但它不必与应用程序名称匹配,大小写也不重要。但是,请记住,首选项文件的名称将与标识符相同,因此用户应该可以将标识符识别为属于您的应用程序。
您可以通过按 Command-1 查看导航器视图、单击 xxx-Info.plist 文件(其中 xxx 是您的应用程序名称)并将 Bundle Identifier 字符串更改为您想要的任何内容,来覆盖 Xcode4 中自动配置的包标识符。它不必包含 ${PRODUCT_NAME:rfc1034identifier} 变量。
The bundle identifier must be globally unique (not match any other application in the world) but it doesn't have to match the application name, nor is the case important. However, remember that the preferences file will be named the same as the identifier so the identifier should be recognizable to the user as belonging to your application.
You can override the auto-configured bundle identifier in Xcode4 by pressing Command-1 to see the navigator view, clicking on the xxx-Info.plist file (where xxx is your application name) and changing the Bundle Identifier string to anything you want. It doesn't have to contain the ${PRODUCT_NAME:rfc1034identifier} variable.