buildactions
• clean
• build
• archive
• install*
• test*
* Mac only
you can specify multiple at once
Slide 16
Slide 16 text
xcodebuild info
xcodebuild -list
Slide 17
Slide 17 text
xcodebuild info
xcodebuild -showBuildSettings
Slide 18
Slide 18 text
xcodebuild info
xcodebuild -showsdks
Slide 19
Slide 19 text
xcodebuild tips
• Multiple Xcode Installs?
• Use DEVELOPER_DIR environment
variable to select.
Slide 20
Slide 20 text
xcodebuild tips
• Error running xcodebuild?
• Run xcodebuild -license and
accept.
Slide 21
Slide 21 text
xcodebuild tips
• More information
• WWDC 2012 Session 404 - Building from
the Command Line with Xcode
Slide 22
Slide 22 text
Distribution
Slide 23
Slide 23 text
Distributing to Testers
• Device Needs to be Provisioned
• (max 100)
• User Needs Provisioning Profile
Slide 24
Slide 24 text
Distributing to Testers
• A packaged app — .ipa file
• Provisioning profile
Email
Slide 25
Slide 25 text
How do I make .ipa?
xcrun -sdk iphoneos PackageApplication \
\
-o
Slide 26
Slide 26 text
How do I make .ipa?
xcrun -sdk iphoneos PackageApplication \
\
-o \
--sign \
--embed
re-sign the .ipa
Slide 27
Slide 27 text
OTA Install
• Easiest User Experience
• Annoying Setup
• Bring your own server
• Must use absolute URLs
• No error messages, just “fails”
Slide 28
Slide 28 text
No content
Slide 29
Slide 29 text
HTML Link
Download Me
MIME types
application/octet-stream ipa
text/xml plist
Link
itms-services://?
action=download-manifest&
url=http://foobar.com/MyApp.plist
HockeyApp & TestFlight
similarities
• Easy OTA Distribution
• Crash Reports
• Analytics
• Tester Feedback
Slide 43
Slide 43 text
HockeyApp & TestFlight
differences
• HockeyApp
• More platforms (iOS, Android, Mac)
• More API Access
• TestFlight
• Free
Slide 44
Slide 44 text
Continuous Integration
Continuous Integration is a software development
practice where members of a team integrate their
work frequently… Each integration is verified by an
automated build (including test) to detect
integration errors as quickly as possible.
martinfowler.com/articles/continuousIntegration.html
Slide 45
Slide 45 text
Continuous Integration
• Automated Builds
• With Testing
• To Find Errors Quickly
Slide 46
Slide 46 text
The State of iOS Unit
Testing
Slide 47
Slide 47 text
Unit Testing in Xcode
Slide 48
Slide 48 text
Unit Testing outside
Xcode
Slide 49
Slide 49 text
Unit Testing outside Xcode is awful
‘test’ build action doesn’t
work for iOS
Slide 50
Slide 50 text
Unit Testing outside Xcode is awful
TEST_AFTER_BUILD=YES
doesn’t work
Slide 51
Slide 51 text
Unit Testing outside Xcode is awful
Can’t launch simulator
from command line
Slide 52
Slide 52 text
Unit Testing outside Xcode is awful
Hacks require editing an
internal tool:
/Tools/
RunPlatformUnitTests.include
Slide 53
Slide 53 text
New Testing Service
Hoping to solve these issue
Slide 54
Slide 54 text
cisimple
cisimple.com
Slide 55
Slide 55 text
cisimple
• New continuous integration service for iOS &
Android
• Just entered public beta
• GitHub, TestFlight, HockeyApp support
Slide 56
Slide 56 text
cisimple
• Build each time commit is pushed
• Run OCUnitTests
• Run UIAutomation Instrument
Slide 57
Slide 57 text
Xcode Build
Automation
How it affected my work
Slide 58
Slide 58 text
Before Xcode Automation
It took 2 developers 3 days to do
all of our builds
Slide 59
Slide 59 text
After Xcode Automation
1 Developer
20 Minutes
Spare Machine