Can't change bundle ID in project, greyed out

你离开我真会死。 提交于 2019-11-30 05:36:11

Not sure why this is happening to you, but try to change in the info.plist file.

If anybody else runs into this, it is likely because you have a product name variable, something like .${PRODUCT_NAME:rfc1034identifier}, appended to the end of your bundle identifier under Target (your application) > Info (info.plist). Try removing that.

Kunal Khanna
  1. Go to info.plist file
  2. Go to Bundle Identifier key-value pair
  3. Remove .${PRODUCT_NAME:rfc1034identifier} from the value and save the file

Your bundle identifier has been modified as required.

Questor

You may want to consider changing the value of PRODUCT_NAME instead of directly changing the bundle identifier. This can be done thru the XCODE interface (and should have the added benefit of not possibly causing problems with certificates and code signing later on...which can be a real bear to resolve):

Click here to see stackoverflow thread for detailed instructions on how to do this thru XCode interface

If you want to edit the Product Name, rather than remove it; you can set it in your target, using the following steps:

  • Open the Target in XCode
  • Go to the Build Settings tab
  • Scroll down to Packaging->Product Name

The name set in Product Name is added to the Bundle Identifier (spaces are changed to dashes e.g "Test App" becomes "Test-App").

It may be that it's set in a .xcconfig file instead. For example, one Parse sample project has a 'debug.xcconfig' with:

BUNDLE_IDENTIFIER = com.parse.Anypic

If so, this is the place to change it.

I saw this also happen when the iOS Deployment Target is higher than your version of Xcode supports. Between World Wide Developers Christmas when they release the betas and when the new version is finalized.

So say you have a project with a min deployment for the current iOS beta version, but you are using the release version of Xcode. Just open the project in the current Xcode beta version.

This can also be related to user defined variables under [Target] > Build Settings > User-Defined

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