Why do we need CI? • Early problems detection “Who has broken the repo??!!” • Independent sources check “I swear it works on my machine!!” • “Current” build availability “Hey! It’s already 16:55! Could you make a build?” • You could find your own reasons
Code signing strategies • Setup everything on the CI server Nasty setup and maintenance • Keep private key/certificate/profile in the sources Every time you do so, God kills a kitten
Private key/certificate file • Normally it’s a .pem file • Usually it’s a .p12 file from the Keychain • Certificate might be embedded in .p12 • Alternatively certificate might be given as .cer file
Reading .mobileprovision (Cocoa) mobileprovision-read -- mobileprovision files querying tool. USAGE mobileprovision-read -f fileName [-o option] OPTIONS type – prints mobileprovision profile type (debug, ad-hoc, enterprise, appstore) appid – prints application identifier Will print raw provision's plist if option is not specified. You can also use key path as an option. EXAMPLES mobileprovision-read -f test.mobileprovision -o type Prints profile type mobileprovision-read -f test.mobileprovision -o UUID Prints profile UUID mobileprovision-read -f test.mobileprovision -o ProvisionedDevices Prints provisioned devices UDIDs mobileprovision-read -f test.mobileprovision -o Entitlements.get-task-allow Prints 0 if profile doesn't allow debugging 1 otherwise https://github.com/0xc010d/mobileprovision-read
xctool • xcodebuild replacement from Facebook • Human-friendly output (json/XML/your own format are also supported) • Better tests support https://github.com/facebook/xctool $ brew install xctool
CI software • Jenkins (former Hudson) • Hudson (isn’t cool anymore) • TeamCity (cool but you have to pay if you have more then 20 build configs) • CruiseControl (bunch of XML configs, IMO uncool) • ...
Xcode plugin for Jenkins • Versioning (agvtool) • Packaging (PackageApplication) • Signing (keychain should be created first) • Unit Testing + test report • v1.3.1 (27th March 2012) https://wiki.jenkins-ci.org/display/JENKINS/Xcode+Plugin
iOSBuilder signing • .p12 and .mobileprovision are attached to the job • Automatic developer identity choosing • Custom (created by the plugin) keychain
Future plans • Nearest future • Help texts • xcodebuild output parsing • OTA on the build page • Distant future • Code resigning • OCLint support • UI testing support Give your ideas!