How to change the bundle identifier of an app in Xcode 5?

IphoneXcodeXcode5

Iphone Problem Overview


Xcode 5 won't let me change the bundle identifier. The app name portion after com.mycompany. is greyed out.

I created a bundle identifier in ITC which slightly differs and I want to use this new bundle identifier.

Do I have to create a new Xcode project with the correct identifier?

Iphone Solutions


Solution 1 - Iphone

Actually this is pretty simple:

  1. Select your target
  2. Select 'info' tab (you can do the same by finding the plist file on the project)
  3. Search for "Bundle Identifier" key, The value on your end should be com.mycompany.${PRODUCT_NAME:rfc1034identifier}.

If you want to change the grey field just replace the "com.mycompany" with whatever you want. the other field is the "Product Name" (which is read dynamically from the relevant key), You can change it by set the "Product Name" key on "Build Settings". You can also do it pretty ugly and change all the bundle identifier to whatever you want but I don't recommend that because if you would add more targets it would be static and harder to maintain.

Solution 2 - Iphone

  1. Select your target under the Targets section.
  2. Go to the Build Settings tab.
  3. Scroll down to Packaging.
  4. Change the Product Name to the desired one.

Pic

Solution 3 - Iphone

In Xcode 5.1.1, you can do it by simply renaming your Target. Double-click on the Target name to change it.

Solution 4 - Iphone

In your projects Info.plist(or in Info tab of project setiings, which is the same) change ${PRODUCT_NAME:rfc1034identifier} to desired name. After that it wouldn't be greyed out.

Solution 5 - Iphone

I had to do this for my project too and found it easily done in Xcode 5.1.1 by just renaming the project name in the Navigator and allow Xcode to find all the strings you need to change automatically. Just make sure you check-in or create a snapshot of your project first.

Solution 6 - Iphone

Your bundle identifier is based on PRODUCT_NAME.

By default, PRODUCT_NAME is based on TARGET_NAME, which is quite difficult to change (XCode6 at time of writing). So don't be afraid to impose a different name here if necessary.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionopenfrogView Question on Stackoverflow
Solution 1 - IphoneIdanView Answer on Stackoverflow
Solution 2 - IphoneArtyomView Answer on Stackoverflow
Solution 3 - IphonesamView Answer on Stackoverflow
Solution 4 - IphoneTimur KuchkarovView Answer on Stackoverflow
Solution 5 - IphoneushikaView Answer on Stackoverflow
Solution 6 - Iphone1owk3yView Answer on Stackoverflow