Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Xcode Build Automation & Distribution

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Xcode Build Automation & Distribution

A talk I gave at PhillyCocoa on the tools and caveats with automating your Xcode builds and distribution.

Matt Thomas

March 17, 2013

Transcript

60 slides
  1. buildactions • clean • build • archive • install* •

    test* * Mac only you can specify multiple at once
  2. xcodebuild tips • More information • WWDC 2012 Session 404

    - Building from the Command Line with Xcode
  3. Distributing to Testers • Device Needs to be Provisioned •

    (max 100) • User Needs Provisioning Profile
  4. How do I make .ipa? xcrun -sdk iphoneos PackageApplication \

    <PRODUCT.app> \ -o <PRODUCT.ipa> \ --sign <CODESIGN_IDENTITY> \ --embed <PROVISONING_PROFILE> re-sign the .ipa
  5. OTA Install • Easiest User Experience • Annoying Setup •

    Bring your own server • Must use absolute URLs • No error messages, just “fails”
  6. HTML Link <a href="itms-services://?action=download- manifest&url=http://foobar.com/ MyApp.plist">Download Me</a> MIME types application/octet-stream

    ipa text/xml plist Link itms-services://? action=download-manifest& url=http://foobar.com/MyApp.plist
  7. gem install shenzhen • command line tool: ipa • Clean,

    Build, Archive, Distribute • TestFlight • HockeyApp • FTP
  8. HockeyApp & TestFlight differences • HockeyApp • More platforms (iOS,

    Android, Mac) • More API Access • TestFlight • Free
  9. 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
  10. Unit Testing outside Xcode is awful Hacks require editing an

    internal tool: <XCODE_DEVELOPER_DIR>/Tools/ RunPlatformUnitTests.include
  11. cisimple • New continuous integration service for iOS & Android

    • Just entered public beta • GitHub, TestFlight, HockeyApp support
  12. cisimple • Build each time commit is pushed • Run

    OCUnitTests • Run UIAutomation Instrument

More Decks by Matt Thomas

Other Decks in Programming