Obviously, the build machine has to be an OSX machine with XCode developer tools installed.
Add the XCode build step to a free-style project and set the target (e.g. MyApp), configuration (e.g. Release) and check the build IPA and update version number options. This will give you a single, versioned .ipa file. You can also select to clean the project before a build; while this will make sure that the project is starting from a clean state, it will make large projects take a lot longer.
Add the XCode build step and this time specify your unit test target (e.g. MyAppTests), configuration (e.g. Debug) and the SDK (e.g. Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/).
One can easily support multiple versions by using environment variables. But first one need to install multiple versions on the build server. Here's one strategy:
0. Note current config.
1. download xcode DMGs from http://developer.apple.com/downloads/
2. enable install from everywhere (under System preferences / Security)
Without that I had problems installing xcode, without graphical feedback, tested on 10.9.5, freshly booted.
Someone attempted to start application App:"Xcode" asn:0x0-1b62b61 pid:57656 refs=6 @ 0x7fa5d9f6df40 but it still has _kLSApplicationLockedInStoppedStateKey=true, so it is is staying stopped. : LASApplication.cp #2468 SetApplicationInStoppedState() q=LSSession 100027/0x186bb queue
3. open DMG file, copy app to /Applications. This might take a while.
4. close /Volumes/Xcode (otherwise installation won't start)
5. start Xcode, accept agreement, install missing packages if necessary. This might take a while. Close xcode after GUI opens.
6. move freshly installed Xcode to new path, e.g.
sudo mv /Applications/Xcode.app /Applications/Xcode6.1.app
(I use this so that the xcode app appears with version number under spotlight)
7. reset default xcode-select if necessary (installation might have changed it / reset to /Applications/Xcode.app)
sudo xcode-select -s /Applications/Xcode6.1.app
(Note the part above could be fully automated....)
1. Use EnvInject plugin
under Inject environment variables to the build process
When code-signing, a prompt may appear on the build machine asking whether to allow keychain access.
If this prompt is not showing on the build machine, you can force it to appear by running the codesign command that failed from a terminal on the build machine: /usr/bin/codesign --force --sign "iPhone Distribution: .....
You probably just installed XCode (by default it is in /Developer) but its path isn't configured. You can fix it with
You should now be able to execute xcodebuild. Ex :
XCode 4.3 changes 2 things that are important for our usage on a slave or a master :
Skip to end of metadata Go to start of metadata