LoginSignup
1
0

More than 5 years have passed since last update.

fastlaneでiOSのAdHoc用アプリをビルドする

Posted at

fastlaneをインストール

# もしXcodeのコマンドラインツールをイントールしていなければインストールする
xcode-select --install

# Xcodeプロジェクトのディレクトリに移動
cd ./AwesomeProject

# Gemfileファイルを生成
# 直接インストールする事も可能だが、Gemfileでインストールする
vi ./Gemfile

プロジェクト直下にGemfileというファイルを作成し、以下の通り記載。

Gemfile
source "https://rubygems.org"

gem "fastlane"
# Rubyがインストールされていなければインストール
# ここの手順は省く

# もしbundlerがインストールされていなければインストール
sudo gem install bundler

# Gemfileをベースにfastlaneをインストール
bundle install

fastlane gymを設定

# fastlane初期化
bundle exec fastlane init

# fastlane gym初期化
bundle exec fastlane gym init

書き出されたGymfileを編集する。
プロジェクトのプロファイル名はiOS Provisioning ProfilesのName。

fastlane/Gymfile
export_options({
  method: "ad-hoc",
  provisioningProfiles: { 
    "com.example.awesome-project" => "iOS Distribution AdHoc AwesomeProject"
  }
})

ビルド

bundle exec fastlane gym

するとプロジェクト直下にipaが出力される。
これをTestFlightにアップロードしたりApple Configurator 2を使って実機にインストールしたりする。

1
0
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
1
0