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

Xcode 8のCI事情/xcode-8-ci-with-fastlane

Fumiya Nakamura
September 28, 2016

Xcode 8のCI事情/xcode-8-ci-with-fastlane

potatotips #33

- OS X CIの最新Xcodeへの対応の早さの違いなどCI毎の差異
- Fastlane利用時のTips

Fumiya Nakamura

September 28, 2016
Tweet

More Decks by Fumiya Nakamura

Other Decks in Programming

Transcript

  1. Xcode 8ͷCIࣄ৘
    גࣜձࣾookami!
    @nafu003
    2016/09/28 potatotips #33

    View Slide

  2. ookami
    !!!?

    View Slide

  3. εϙʔπΛ௨ͯ͠
    ਓʑͷੜ׆Λ๛͔ʹ

    View Slide

  4. View Slide

  5. Xcode 8ͷCIࣄ৘

    View Slide

  6. Goal
    ֤Ϣʔεέʔεʹ߹ͬͨCIΛબ୒Ͱ͖Δ
    Xcode 8ͰͷϏϧυࣗಈԽΛ؆୯ʹ͢Δ

    View Slide

  7. ࠷৽Beta͕Beta 6ͷ࣌
    CIରԠঢ়گ

    View Slide

  8. Travis CI
    Beta 6

    View Slide

  9. Bitrise
    Beta 6

    View Slide

  10. Cicle CI
    Beta 3

    View Slide

  11. Beta 3
    ( 'ω')
    ;͊ͬʂʁ

    View Slide

  12. Xcode 8 GMϦϦʔε࣌
    - Travis CI -> GM
    - Bitrise -> GM
    - Circle CI -> Beta 6

    View Slide

  13. Circle CI
    ࠷৽Xcode΁ͷରԠ
    ໿1ʙ2िؒ஗Ε

    View Slide

  14. Compare CI Plans

    View Slide

  15. CI্ͰͷXcode 8Ϗϧυ

    View Slide

  16. CI্ͰͷXcode 8Ϗϧυ
    with fastlane

    View Slide

  17. Xcode 8
    - Swift 2.3
    - Swift 3.0
    Xcode 8 has multiple
    toolchains

    View Slide

  18. Fastlane
    didn't have toolchain option !

    View Slide

  19. fastlane/fastlane#5864

    View Slide

  20. toolchain option
    gym(toolchain: 'com.apple.dt.toolchain.Swift_2_3')
    gym(toolchain: :Swift_2_3) # Next Version
    use_legacy_build_api option
    gym(use_legacy_build_api: true) # Use old API
    gym(use_legacy_build_api: false) # Use new API after Xcode 7

    View Slide

  21. Do not use Automatic Signing
    https://docs.fastlane.tools
    Although Apple recommends it in WWDC 2016

    View Slide

  22. register_devices
    fastlane run register_devices devices_file:$DEVICES_FILE_PATH
    fastlane match --app_identifier "$BUNDLE_IDENTIFIER" \
    --type "adhoc" --force_for_new_devices
    multiple-device-upload-ios.txt
    Device ID Device Name
    A123456789012345678901234567890123456789 NAME1
    B123456789012345678901234567890123456789 NAME2

    View Slide

  23. Fastlane Plugins
    # List all available plugins using
    fastlane search_plugins
    # Add a plugin to your project
    fastlane add_plugin [name]
    # Create your own plugin
    fastlane new_plugin [plugin_name]
    docs.fastlane.tools/plugins

    View Slide

  24. ensure_xcode_build_version
    nafu/fastlane-plugin-ensure_xcode_build_version

    View Slide

  25. Fastlane docs
    docs.fastlane.tools

    View Slide

  26. Summary
    → Circle CI͸Xcodeʹଈ೔ରԠͯ͘͠Εͳ͍ͷͰ஫ҙ
    → ಛʹSwift 2.3ʹؔͯ͠͸Xcode 8ͰͷϏϧυʹ஫ҙ
    → toolchain, use_legacy_build_apiͳͲ
    → Automatic Signing͸࢖Θͳ͍
    → ศརͳAction͸pluginsͰެ։͠Α͏ʂ

    View Slide

  27. View Slide