見出し画像

Xcode15のOrganizerでApp Storeにアップロードできないときの対処法

Xcodeを15.0にアップデートし、アーカイブをOrganizerでApp Storeにアップロードしようとしたところ、エラーが表示されてアップロードできませんでした。本記事では、私が遭遇したエラーの内容と原因、対処法を紹介したいと思います。

前提

  • Xcode 15.0

  • iOSアプリ開発

  • XcodeにログインしているApple IDアカウントのApp Store Connectの設定

    • 役割:アプリManager

    • その他のリソース:証明書、ID、プロファイルへのアクセス権限はない

  • iPhone Distribution証明書と秘密鍵のファイルを受領して開発用Macのキーチェーンに登録済み

  • App Store用Provisioning Profileのファイルを受領してXcodeにインポート済み

再現手順

  1. Xcode 15.0でアーカイブを実行する

  2. アーカイブが終わるとOrganizerが自動で起動する

  3. アップロード対象を選択し、[Distribute App] ボタンを押す

  4. [Select a method for distribution] というタイトルの画面が表示されるので、[TestFlight & App Store] を選択して [Distribute] ボタンを押す

Xcode 15.0のOrganizerでTestFlight & App Storeを選択

この手順で下記のエラーが発生しました。

発生したエラーの内容

Xcode 15.0のOrganizerでDistribute Appをしようとしたときに発生したエラー

ダイアログの中には次のメッセージが表示されていました。

No Account for Team "XXXXXXXXXX".
Add a new account in Accounts settings or verify that your accounts have valid credentials.

No profiles for 'xx.xx.xxxxx.xxxxx' were found
Xcode couldn't find any iOS App Store provisioning profiles matching 'xx.xx.xxxxx.xxxxx'.

エラーの回避策

Xcode 15.0のOrganizerでCustomを選択

Organizerの [Select a method for distribution] 画面で [Custom] を選択すれば、Xcode 14までと同じフローでApp Storeへアップロードすることができました。

Xcode 15の新機能:Streamlined Distribution

Streamlined Distribution

ところで、Organizerで [Distribute App] ボタンを押すと出てくる[Select a method for distribution] 画面は、Xcode 15で新規に追加された画面です。

Xcode 15のリリースノートの該当部分は次のとおりです。

Signing and Distribution
New Features
(中略)
Xcode Organizer window now supports streamlined archive distribution. Uploading or exporting an archive can now be accomplished with one click. Streamlined distribution methods use recommended settings. The custom method allows selection of other options. (103967573)

https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes (2023/10/06 閲覧)

また、Xcode updatesのページには以下のような記述がありました。

Distribution and continuous integration

Use streamlined options in the Xcode Organizer window to distribute your app using recommended settings. Choose from several preconfigured methods of distribution or create a custom configuration for your needs. See Distributing your app for beta testing and releases.
(中略)
Related sessions from WWDC23
Session 10224: Simplify distribution in Xcode and Xcode Cloud

https://developer.apple.com/documentation/Updates/Xcode (2023/10/06 閲覧)

さらに、WWDC23のセッションでもこの機能が紹介されていました。

要するに、[TestFlight & App Store][TestFlight Internal Only][Release Testing][Debugging]といった選択肢はstreamlined optionsと呼ばれるものであり、たった1回クリックするだけで、署名からアップロードまでをオススメの設定に従って自動的に処理してくれる機能のようです。

原因(推測)

Xcode 14までは、Organizerで [Distribute App] を押した後にオプションやProvisioning Profileを選択したり確認したりする操作を5回ほど行うと、ようやくアップロードが始まるという流れでした。一方、Xcode 15の新機能である [Select a method for distribution] 画面の [TestFlight & App Store] などのボタンは、そのような煩わしい作業をXcodeが自動でやってくれるというものです。その自動処理の過程で、ログイン中のApple IDアカウントを使ってProvisioning Profileを取得しようとしているのではないかと思います。

Xcode 15.0のOrganizerでTestFlight & App Storeを選択

ところが、今回エラーが発生したアカウントでは運用の都合上、App Store Connectのユーザ設定で証明書、ID、プロファイルへのアクセス権限をOFFにしていました。そのため、Provisioning Profileの取得に失敗したのだと推測しています(公式ドキュメントの記述が見当たらず、実際に検証もできていないため、確定情報ではありません)。

なお、証明書、ID、プロファイルへのアクセス権限がONになっているかどうかは、App Store Connectの [ユーザとアクセス] にある各ユーザの設定画面で確認できます。[Certificates, Identifiers & Profiles(証明書、ID、プロファイル)へのアクセス。] と書かれているチェックボックスです。

App Store Connectのユーザ設定画面

宣伝

NTTレゾナントテクノロジーでは一緒に働いてくれるAndroid/iOSアプリエンジニアを募集中です。もし興味がありましたら採用ページを是非ご覧ください。

(文:NTTレゾナントテクノロジー 西添)


この記事が気に入ったらサポートをしてみませんか?