Is bundle id case sensitive?

こ雲淡風輕ζ 提交于 2019-12-01 13:42:55

问题


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?


回答1:


The bundle ID is case sensitive. From the Apple Docs:

However, unlike domain names, bundle IDs are case sensitive. If the App ID is lowercase, your bundle ID needs to be lowercase, too.

Note that the bundle ID is not what the user will see as the app name. That's the "Bundle Display Name"




回答2:


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.



来源:https://stackoverflow.com/questions/7688379/is-bundle-id-case-sensitive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!