LoginSignup
5
5

More than 5 years have passed since last update.

Xcode8にしたときのcircle.ymlとFastfileなどの設定

Last updated at Posted at 2016-10-06

CircleCIのWEB設定

環境変数

  • FASTLANE_ITC_TEAM_ID
  • FASTLANE_PASSWORD
  • DEPLOYGATE_API_TOKEN
  • DEPLOYGATE_USER
  • DEPLOYGATE_DISTRIBUTION_KEY

Keychain

iPhone DistributionのKeychainを設定する

設定ファイル

Gemfile
source "https://rubygems.org"

gem "cocoapods", "1.1.0.rc.2"
gem "fastlane"
circle.yml
machine:
  timezone: Asia/Tokyo
  xcode:
    version: '8.0'
dependencies:
   cache_directories:
    - "/Users/distiller/.cocoapods/"
test:
  override:
    - echo 'no test'
deployment:
  develop:
    branch: develop
    commands:
      - bundle exec fastlane adhoc --verbose
  master:
    branch: master
    commands:
      - bundle exec fastlane adhoc --verbose
      - bundle exec fastlane beta --verbose
      - git push git@github.com:dessart/insta-app.git master -f
Fastfile
fastlane_version "1.104.0"

default_platform :ios

platform :ios do
  lane :adhoc do
    cert
    sigh(force: true)
    gym(scheme: "Techinsight", configuration: "AdHoc")
    deploygate
  end

  lane :beta do
    cert
    sigh(force: true)
    gym(scheme: "Techinsight", configuration: "Release")
    pilot(skip_waiting_for_build_processing: true)
  end

  lane :release do
    cert
    sigh(force: true)
    gym(scheme: "Techinsight", configuration: "Release")
    deliver(skip_screenshots: true, skip_metadata: true)
  end

  lane :refresh_dsyms do
    download_dsyms                # Download dSYM files from iTC
    upload_symbols_to_crashlytics # Upload them to Crashlytics
    clean_build_artifacts         # Delete the local dSYM files
  end
end

circle.ymlのCocoapodsのキャッシュ設定はこちらを参考にしました。
https://lebedev.cc/speeding-up-ios-builds-on-circleci/

ハマリポイント

Automatically manage signingのチェックを外す

https://docs.fastlane.tools/codesigning/getting-started/ を参考に以下の作業を行ったほうがいい場合がある。

スクリーンショット 2016-10-07 7.52.56.png

mobileprovisionをプロジェクトに含める

CircleCIはmobileprovisionを参考にInstall Code Signing Credentialsを実地するためsighで生成されるmobileprovisionがプロジェクトに含まれる必要がある。

$ sigh --development
$ sigh --adhoc
$ sigh

mobileprovisionが3つなのにConfigurationsが2つだと困るため、Configurationsを増やす。

スクリーンショット 2016-10-07 7.53.16.png

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5