修改灰色Bundle ID Bundle Identifier

转载请标明出处:http://blog.csdn.net/xx326664162/article/details/50771495 文章出自:薛瑄的博客

你也可以查看我的其他同类文章,也会让你有一定的收货!

问题:
TARGETS->General->Identity->Bundle Idenrifier 显示灰色无法删除和更改,只能在它的基础上增加

原因:
可能是别人在他的电脑上用其它APP ID 编译过了程序,你在把项目复制到你的电脑上,会出现这个问题

根本原因:

在TARGETS->Info->Custom iOS Target Properties ->Bundle identifiter 中设置中写入的是动态参数$(PRODUCT_BUNDLE_IDENTIFIER)

解决该问题,分两种情况:

1、修改Product Bundle Identifiter

在TARGETS->Build Settings ->Packaging ->Product Bundle Identifiter 中修改为自己需要的APP ID。

Product Bundle Identifiter 可以修改动态参数$(PRODUCT_BUNDLE_IDENTIFIER)对应的值,这个为空,可能会报错:

error: coule not read XXXX from Info.plist(null)

  • 我知道的是 Xcode 7 以后的版本有这个设置选项,可能之前的版本也有这个设置项,
  • 若没有Product Bundle Identifiter,请使用下面的方法

2、没有Product Bundle Identifiter 这个选项

修改Bundle Identifiter 为固定App ID,两种方法:

  1. 在TARGETS->Info->Custom iOS Target Properties ->Bundle identifiter 设置中,写入自己的需要的App ID

  2. 打开工程目录中 XXXX.plist文件,修改Bundle identifiter 为自己的需要的App ID

参考:
http://stackoverflow.com/questions/33122484/use-bundle-identifier-instead-of-product-bundle-identifier-with-xcode-7

http://stackoverflow.com/questions/32862253/xcode-7-changing-product-bundle-identifier

http://www.ithao123.cn/content-7074736.html

http://blog.163.com/dance_2014/blog/static/23383119520145164935189/

http://www.cocoachina.com/bbs/read.php?tid-456426-page-2.html 12楼

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

薛瑄

文章不错,请博主吃包辣条

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值