如何在Xcode 5中更改应用程序的软件包标识符? [英] How to change the bundle identifier of an app in Xcode 5?

查看:124
本文介绍了如何在Xcode 5中更改应用程序的软件包标识符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xcode 5不允许我更改包标识符。 com.mycompany。之后的应用名称部分显示为灰色。

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

我在ITC中创建了一个包标识符不同,我想使用这个新的包标识符。

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

我是否必须使用正确的标识符创建一个新的Xcode项目?

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

推荐答案

实际上这很简单:


  1. 选择目标

  2. 选择信息标签(您可以通过查找项目中的plist文件来执行相同操作)

  3. 搜索Bundle Identifier键,您的值end应为 com.mycompany。$ {PRODUCT_NAME:rfc1034identifier}

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

如果您想更改灰色字段,只需将com.mycompany替换为您想要的任何内容。另一个字段是产品名称(从相关密钥动态读取),您可以通过在构建设置中设置产品名称键来更改它。您也可以非常难看,并将所有的包标识符更改为您想要的任何内容,但我不建议这样做,因为如果您要添加更多目标,它将是静态的并且难以维护。

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.

这篇关于如何在Xcode 5中更改应用程序的软件包标识符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆