iPhone/Xcode: can different project targets have different bundle identifiers? iPhone/Xcode: can different project targets have different bundle identifiers? xcode xcode

iPhone/Xcode: can different project targets have different bundle identifiers?


There isn't a precedence, the properties dialog is just serving as another way for you to see your Info.plist.

To share the plist between the targets but have different identifiers, make sure that the "Expand Build Settings in Info.plist File" option is enabled for both targets. Then, for each target, make a new user-created variable in the target settings for your bundle ID (e.g., APPLICATION_BUNDLE_IDENTIFIER, see here: https://stackoverflow.com/a/18472235/308315) and set it to the right value for that target. In your plist, put the following for bundle ID:

<key>CFBundleIdentifier</key><string>$(APPLICATION_BUNDLE_IDENTIFIER)</string>

The variable will be evaluated at build time for each target, so each will get the right bundle ID.