Question

I've got a phonegap project that is getting built via Jenkins via the Xcode plugin. After the project is built, I'm using the TestFlight plugin to upload it there. Everything works great.

Now, I need to add two more versions of this for our different environments so I'll have a Dev and Test version (and also Prod, but not to TestFlight).

In order to do this, I need to change the name of the application so both Dev and Test show up in TestFlight, MyProgram-Dev, and MyProgram-Test. Then the production version would just be MyProgram.

In the xcode section on Jenkins, there's a "custom xcodebuild arguments" field that can be filled out, which I'm assuming is where I need to make my changes. I want to do this at build time because I don't want the program name to change when merging Dev into Test, etc.

I've done alot of googling and can't find any example command line parameters for the xcode build process. Is it the CFBundle that I need to be changing? What is the name of the parameter to change?

Edit: So I was able to change the production name via 'PRODUCT_NAME=MyProject-Test', but that produced the following error:

The following build commands failed:

Ld /Users/buildaccount/Library/Developer/Xcode/DerivedData/MyProject-cpvmaiwadviebmbhkdggxpzejddf/Build/Intermediates/MyProject.build/Release-iphoneos/MyProject.build/Objects-normal/armv7/MyProject-Test normal armv7
Was it helpful?

Solution

Wow, that took alot of googling and testing.

Here's what was the eventual fix for my scenario. It was a combination of this post/answer, as well as this one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top