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

Travis iOS

Travis iOS

975ff6c8166f6f32889f004a904ffa39?s=128

Oursky Limited

June 30, 2014
Tweet

Transcript

  1. Continuous Integration iOS on Travis

  2. The idea • Atomic commits • Automated, test, build and

    delivery • One version, aka. no branching
  3. Actual steps • Write Test • Write Code • Push

    - Github • Automated Test - Travis-CI • Automated distribution - TestFlight
  4. Test in general • Input <—> Output Checking • Function

    <—> State Checking • Actions <—> Behaviour Checking
  5. Test in Xcode • XCTest automatically include since Xcode5 •

    Press ⌘+U • xcodebuild • xctool - facebook xcodebuild with pretty print
  6. Travis.yml language: objective-c script: - xctool test -workspace asosnewin.xcworkspace -scheme

    asosnewin -sdk iphonesimulator7.0 ONLY_ACTIVE_ARCH=NO
  7. Build,Sign and distribute • xctool -workspace asosnewin.xcworkspace -scheme asosnewin -sdk

    iphoneos7.1 -configuration Release OBJROOT=$PWD/build SYMROOT=$PWD/build ONLY_ACTIVE_ARCH=NO • xcrun -log -sdk iphoneos PackageApplication "$APP_NAME.app" -o "$APP_NAME.ipa" -sign "$DEVELOPER_NAME" -embed "$PROVISIONING_PROFILE" • curl http://testflightapp.com/api/builds.json -F file="@$APP_NAME.ipa"
  8. Setup Env on Travis • travis encrypt "APP_NAME=GIFCAM" —add •

    Keys • Encrypt with openssl aes-256-cbc and checkin into github • decrypt the key and do security import on travis
  9. Reference • http://www.objc.io/issue-6/travis-ci.html • http://martinfowler.com/articles/ mocksArentStubs.html • https://developer.apple.com/library/ios/ documentation/ToolsLanguages/Conceptual/ Xcode_Overview/UnitTestYourApp/

    UnitTestYourApp.html