Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
998 views
in Technique[技术] by (71.8m points)

jenkins - Xcode 7: changing product bundle identifier

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.

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

Jenkins Xcode plugin - Code signing & OS X keychain options

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.

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 beforetarget general beforepackaging

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

Info plist changed

The other two value will be:

target general after packaging after

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?

Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Faced the same problem.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...