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

查看:38
本文介绍了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 > General > Bundle Identifier 中的包标识符.但它不会更改 Build Settings > Packaging > Product Bundle Identifier 中的 bundle identifier.

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天全站免登陆