LoginSignup
6
3

More than 3 years have passed since last update.

CodemagicでApp Store Connect APIの使い方が新しくなっていたので対応した記録

Posted at

Codemagicを使っていて少し久しぶりにビルド・配信しようとしたらAndroidは問題なかったのですが、iOSだけApp Store Connectに配信できていませんでした。
結論としては、App Store Connectとの連携方法が変更されていたから見たいです。

雑ではありますが、以下対応した記録となります。

Codemagicからのお知らせ

New Apple Developer Portal integration
Apple Developer Portal integration for automatic code signing now uses App Store Connect API keys for authentication. This means there will be no more expiring sessions or hassle with two-factor authentication. It is possible to set up several keys for code signing and select the right key in workflow settings. We have automatically migrated most of our users but if you’re asked to connect the Apple Developer Portal integration, follow the instructions in our documentation.

DeepL翻訳
新しいApple Developer Portalの統合
自動コード署名のためのApple Developer Portal統合では、認証にApp Store Connect APIキーを使用するようになりました。これにより、有効期限の切れたセッションや二要素認証の煩わしさがなくなります。コード署名用に複数のキーを設定し、ワークフロー設定で適切なキーを選択することが可能です。ほとんどのユーザーは自動的に移行していますが、Apple Developer Portal連携の接続を求められた場合は、ドキュメントの指示に従ってください。

User setting画面のIntegrations

Developer Portal欄を見ると…
App Store Connectとの連携をし直さなくてはならないようです。
API Keyを使うんですね。
スクリーンショット 2020-08-23 16.28.49.png

App Store Connectの「ユーザーとアクセス」にアクセス。
「キー」タブに「App Store Connect API」がありました。
「アクセスをリクエスト」します。
スクリーンショット 2020-08-23 16.23.12.png

すでに自動で生成されたキーがありましたが、API Keyファイルがダウンロードできないので、新しく生成しました。
スクリーンショット 2020-08-23 16.24.01.png

名前は適当につけます。アクセス(権限)は、ドキュメントでお勧めされていた「Developer」を選択。
スクリーンショット 2020-08-23 16.33.02.png

生成できました。.p8ファイルはダウンロードしておきましょう。
Issuer IDも使います。
スクリーンショット 2020-08-23 16.51.28.png

Codemagic/User setting/Integrations/Developer Portal
App Store Connectのユーザーとアクセス画面で手に入れたIDと.p8ファイルを使います。
スクリーンショット 2020-08-23 16.28.49.png

Workflowでも設定が必要(忘れてた)

上記設定して、再ビルドしても配信できてなくて、なんで?と思いましたが、Workflowでも設定が必要でした。
App Store Connect API key (using keys from user settings)でAPI Keyを選択する必要があります!
スクリーンショット 2020-08-23 17.16.28.png

参考ドキュメント

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