LoginSignup
6
5

More than 5 years have passed since last update.

ReactNative のアプリケーションを Bitrise でビルドする

Last updated at Posted at 2017-06-18

ReactNative を使ったアプリケーション作成の際に Bitrise という素敵なCIサービスを使ってビルドする方法をメモしておきます。

証明書を作成する

Android

keytool -genkey -v -keystore example.keystore -alias example -keyalg RSA -keysize 2048 -validity 10000

iOS

Apple Developer に登録

  • 課金と使用の開始にリードタイムが3日あるので注意

Apple Developer の設定

  1. 開発用 Mac の登録
  2. 開発用 Mac の設定
  3. App ID の作成
  4. プロビジョニングの作成
  5. プロビジョニングの設定
  6. .xcodeprojの設定
  1. `path/to/ios/example.xcodeproj`を開く
  2. General の Signing の Automatically manage Signing のチェックを外す
  3. `example.mobileprovision` を import する
    - General の Signing(Debug)
    - General の Signing(Release)
  4. Build Settings の Signing の Code Signing Identity の項目をすべて Certificates された iOS Developer の設定に変更する

参考:

https://i-app-tec.com/ios/app-release.html
http://dev.classmethod.jp/smartphone/ios-certificates2015/
http://dev.classmethod.jp/references/generate-provisioning-ios7/
http://dev.classmethod.jp/smartphone/iphone/ios-app-how-to-release/

Bitrise を利用する

Bitrise はアプリのビルドを行ってくれるサービスです。
GitHub と連携しており基本的には ReactNative のリポジトリを指定すると自動でビルドしてくれます。
ビルド後には.ipa.apkができるのでこれを Deploy Gate などで配布します。

基本的にはマニュアルの通りに実行すれば問題なく作成でいますが React Native を利用する際には追加で以下の設定が必要になります。

Android

WorkFlows の設定

  1. WorkFlows のDo anything with Script stepのあとに+Run npm commandを追加しThenpmcommand with arguments to runinstallと記載
  2. WorkFlows のGradle Runnerのあとに+Sign APKを追加
  3. 右上のCommand + Sで保存

Code Signing の設定

作成したファイルをアップロードする。
それぞれの設定値を設定する。

iOS

WorkFlows の設定

  1. WorkFlows のDo anything with Script stepのあとに+Run npm commandを追加しThenpmcommand with arguments to runinstallと記載
  2. 右上のCommand + Sで保存

Code Signing の設定

Export your code signing files with Codesigndocのとおりに実行して.mobileprovision.p12を作成する。
作成したファイルをアップロードする。
それぞれの設定値を設定する。

6
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
6
5