问题
In Xcode 6, I need to set a custom bundle identifier for my app store target.
I'm trying this:
I tap my project in Xcode upper left.
I see the project settings center pane, "General" tab, "Identity" section.
I see the "Bundle Identifier" field and I click to edit it.
The text changes to a mix of black editable text and gray uneditable text.
How do I edit the bundle identifier?
回答1:
(Found the answer - posting here to help others, and if people have comments)
The Xcode default autogenerates the bundle identifier based on the product name.
To edit a target's bundle identifier:
Tap the icon "Show projects and targets list" in project settings center pane upper left.
Tap the target.
Tap the "Info" tab, and open the "Custom iOS Target Properties" drop arrow.
You see the Key "Bundle Name" set as "$(PRODUCT_NAME)", and the Key "Bundle identifer" set as "com.example.$(PRODUCT_NAME:rfc1034identifier)". Edit these as you wish. Then choose the "Product > Clean" menu item.
回答2:
i think it may be possible to set a custom bundle identifier (and change bundle display name and bundle name) without modifying ${PRODUCT_NAME:rfc1034identifier} (i read in stackoverflow that changing this could cause issues down the road when building for distribution).
to change product name setting: select target / build settings / (packaging) product name
来源:https://stackoverflow.com/questions/28118970/xcode-6-how-to-set-a-custom-bundle-identifier