Xcode 7:更改产品捆绑包标识符 [英] Xcode 7: changing product bundle identifier

查看:167
本文介绍了Xcode 7:更改产品捆绑包标识符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置Jenkins来自动化构建过程.特别是,根据我的需要,我希望能够设置不同的包标识符.

I'm setting up Jenkins to automate the build process. In particular, for my needs, I'd like to be able to set different bundle identifiers.

我正在使用Xcode Jenkins插件来设置包标识符:

I'm using the Xcode Jenkins plugin to set the bundle identifier:

问题在于,这将更改Info.plist文件以及MyTarget>常规>捆绑包标识符中的捆绑包标识符.但是,它不会在构建设置">包装">产品捆绑包标识符"中更改捆绑包标识符.

The problem is that this will change the bundle identifier in the Info.plist file and in MyTarget > General > Bundle Identifier. But it won't change the bundle identifier in Build Settings > Packaging > Product Bundle Identifier.

如果我手动执行此操作,也会发生相同的情况. 我在Xcode 7中创建了一个新项目.默认情况下,这三个值是:

The same thing happens if I do it manually. I create a new project in Xcode 7. By default, the three values are:

当我像这样更改Info.plist文件中的值时:

When I change the value in the Info.plist file like this:

其他两个值将是:

因此,您如何看到构建设置"中的值不变.如果我使用的是Xcode,则可以手动更改该值,但是如果我使用Jenkins构建项目,则这是bis问题.

So how you can see the value in Build Settings is not changing. If I'm in Xcode I change that value manually, but if I'm building the project in Jenkins this is a bis issue.

有人遇到同样的问题吗?您如何解决?

Anyone encountered the same problem? How do you tackle it?

谢谢!

推荐答案

遇到了同样的问题.

PRODUCT_BUNDLE_IDENTIFIERproject.pbxproj文件中的变量.将其更改为所需的内容,它将同时反映在Info.plist和项目设置中.

The PRODUCT_BUNDLE_IDENTIFIER is a variable in your project.pbxproj file. Change that to whatever you want and it will reflect both in your Info.plist as well as the project settings.

这篇关于Xcode 7:更改产品捆绑包标识符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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