Skip to content

#37 デプロイメントセットアップ手順

Issue #37 で実装した B 系(AI モデル分離)/A 系(IAP)/C 系(オンボーディング・通知・Analytics)を 本番稼働させるための手動セットアップ手順 をまとめた索引。

PR #42 〜 #47 のコードはすべて main にマージ済だが、以下の外部システム設定が揃わないと動かない。順序通りに進めることを推奨

進行表

#ドキュメント想定時間担当完了条件
01App Store Connect: サブスクリプション商品設定30 分開発者monthly_1800 / yearly_14400 商品が "Ready to Submit" 状態
02IAP Key (.p8) と Secret Manager20 分開発者Cloud Run 環境変数に APPLE_IAP_PRIVATE_KEY が注入されている
03Apple PKI ルート証明書配置10 分開発者api/app/certs/AppleRootCA-G3.cer が存在し Docker イメージに含まれる
04App Store Server Notifications V2 URL 登録15 分開発者Sandbox / Production 両方の URL が登録され、Test Notification が 200 で返る
05.storekit Configuration ファイル作成15 分開発者Xcode の Scheme で Configuration.storekit が選択され、シミュレータで Sandbox 課金なしに動作
06Firebase Project / iOS SDK 統合30 分開発者GoogleService-Info.plistios/Cycle/ に存在し、Crashlytics ダッシュボードに最初のセッションが届く
07GA4 Measurement Protocol API secret 発行10 分開発者Secret Manager に GA4_API_SECRET が格納され、Cloud Run 環境変数で参照
08BigQuery export と Looker Studio ダッシュボード60 分開発者Looker Studio に「Trial→Paid 転換率」「3ヶ月継続率」のグラフが出ている
09Vertex AI Model Garden のモデル ID 検証10 分開発者claude-sonnet-4-5@... / claude-haiku-4-5@...asia-northeast1 で GA 確認済
10Terms / Privacy URL の差し替え10 分開発者PaywallView.swifttermsURL / privacyURL が公開 URL に差し替え済

合計目安: 約 3 時間。

依存関係

01 (App Store Connect 商品)
  ├──> 04 (ASSN V2 URL 登録)
  └──> 05 (.storekit Config)
02 (IAP Key) ──> 04 (ASSN V2 URL 登録: 検証に必要)
03 (Apple PKI) ──> 04 (検証に必要)
06 (Firebase Project) ──> 07 (GA4 secret) ──> 08 (BQ export)
09 (Vertex AI) [独立]
10 (Legal URL) [独立]

完了後の動作確認

すべてのセットアップが完了したら 動作確認チェックリスト を実施する。

公式ドキュメント早見表

領域公式 URL
App Store Connect Helphttps://developer.apple.com/help/app-store-connect/
Apple Developer: Auto-Renewable Subscriptionshttps://developer.apple.com/documentation/storekit/in-app_purchase/auto-renewable_subscriptions
App Store Server APIhttps://developer.apple.com/documentation/appstoreserverapi
App Store Server Notifications V2https://developer.apple.com/documentation/appstoreservernotifications
Apple PKI Repositoryhttps://www.apple.com/certificateauthority/
Firebase iOS SDKhttps://firebase.google.com/docs/ios/setup
GA4 Measurement Protocolhttps://developers.google.com/analytics/devguides/collection/protocol/ga4
Firebase → BigQuery exporthttps://firebase.google.com/docs/projects/bigquery-export
Looker Studiohttps://lookerstudio.google.com/
Vertex AI: Claude modelshttps://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude
App Store Review Guidelineshttps://developer.apple.com/app-store/review/guidelines/