Is bundle id case sensitive?
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 man开发者_如何学编程ually in Xcode to lower case?
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"
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.
精彩评论