https://github.com/rensawamo/flutter-ios-destribution
github actionの cicid for flutter Apple Store firebase distribution etc...
https://github.com/rensawamo/flutter-ios-destribution
Last synced: 3 months ago
JSON representation
github actionの cicid for flutter Apple Store firebase distribution etc...
- Host: GitHub
- URL: https://github.com/rensawamo/flutter-ios-destribution
- Owner: rensawamo
- Created: 2024-02-19T07:07:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-21T02:58:03.000Z (over 1 year ago)
- Last Synced: 2025-01-08T14:42:30.939Z (5 months ago)
- Language: Dart
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iOS destribution(2024/2)
## fvmを使う場合
``` sh
fvm list
fvm use (上記ver)
or
fvm use stable
```## gitigonreに先に以下を追加しておく
```sh
ExportOptions.plist
ExportOptions.pem
*.pem
**/.fvm/flutter_sdk
**/lib/firebase_options.dart
```## 使用する エンコードコマンド
```sh
$ base64 -i input.xxx -o output.pem
```## 必要な環境変数
- APPLE_APP_PASSWORD : アプリ用パスワード- APPLE_ID : Apple Developerの Apple ID
- CERTIFICATES_P12_BASE64 : Certificates と p12 のエンコード
- CERTIFICATE_PASSWORD : パスワード
- PROVISIONING_PROFILE_BASE64 : Provisioning profile のエンコード
- EXPORTOPTIONS_BASE64 : ExportOptions.plistのエンコード
- IOS_APP_ID : firebase のiOS アプリ名
- CREDENTIAL_FILE_CONTENT : GCP トークン
## APPLE_APP_PASSWORD
https://appleid.apple.com/ に移動 → サインイン → 下記よりアプリ用パスワードを作成
## APPLE_ID
Apple Developerの Apple ID## CERTIFICATES_P12_BASE64
キーチェーンより証明書の要求を作成 → https://developer.apple.com/ に移動 → Certificates, IDs, & Profiles → Certificates → より 以下を選択し .cerファイルをダウンロード
![]()
→ ダブルクリック → キーチェーンの鍵に登録されている → 右クリックで 書き出す を選択

→ .p12 ファイルが作成される → エンコード
## CERTIFICATE_PASSWORD
上記の書き出しの時に パスワードを設定するため、メモしておく## PROVISIONING_PROFILE_BASE64
https://developer.apple.com/ に移動 → Certificates, IDs, & Profiles →
Profiles → より 以下を選択し .mobileprovisio ファイルをダウンロード → エンコード
## EXPORTOPTIONS_BASE64
xcodeに移動 → 以下を設定
→ Product → Archeve → Destribute App → Custom
→ App Store Connect
→ Export
→ ExportOptions.plistをふくむフォルダをダウンロード
→ ExportOptions.plistをプロジェクトのルートディレクトに入れる → エンコード
## firebase 導入
上記で作成した Bundel Identifer と同じ バンドル IDで firebaseのiosプロジェクトを作成。以下に GoogleService-Info.plist ファイルを追加する。
上記の後、firebaseの画面に移動 → アプリの追加 → flutter で
firebase login コマンドなどを順番に実行し、プロジェクトに firebase_option.dartが追加されていることを確認する
### firebase core の導入
[pubget](https://pub.dev/)
から firebase_core のバージョンを指定して```sh
flutter pub get
```firebase_core がないと xcodeでエラーが出る場合は
ios/Flutter/Release.configを以下のように修正```sh
#include? 'Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig'
#include 'Generated.xcconfig'
#include 'Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig'
```### GCP トークン の発行
https://github.com/wzieba/Firebase-Distribution-Github-Action/wiki/FIREBASE_TOKEN-migration#guide-2---the-same-but-with-screenshots
以下のコマンドは、現在では非推奨。
```sh
firebase login:ci
```