Xcode 6: how to set a custom bundle identifier?

蓝咒 提交于 2019-12-21 14:32:36

问题


In Xcode 6, I need to set a custom bundle identifier for my app store target.

I'm trying this:

  1. I tap my project in Xcode upper left.

  2. I see the project settings center pane, "General" tab, "Identity" section.

  3. I see the "Bundle Identifier" field and I click to edit it.

  4. 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:

  1. Tap the icon "Show projects and targets list" in project settings center pane upper left.

  2. Tap the target.

  3. Tap the "Info" tab, and open the "Custom iOS Target Properties" drop arrow.

  4. 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

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