![見出し画像](https://assets.st-note.com/production/uploads/images/118261405/rectangle_large_type_2_37b57527ddc360df95bc413b79b07807.png?width=1200)
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にインポート済み
再現手順
Xcode 15.0でアーカイブを実行する
アーカイブが終わるとOrganizerが自動で起動する
アップロード対象を選択し、[Distribute App] ボタンを押す
[Select a method for distribution] というタイトルの画面が表示されるので、[TestFlight & App Store] を選択して [Distribute] ボタンを押す
![](https://assets.st-note.com/img/1696672663015-CWomQb7B37.png?width=1200)
この手順で下記のエラーが発生しました。
発生したエラーの内容
![](https://assets.st-note.com/img/1696671519517-UU4wMie7te.png?width=1200)
ダイアログの中には次のメッセージが表示されていました。
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'.
エラーの回避策
![](https://assets.st-note.com/img/1696672612618-M6kDd2TbhF.png?width=1200)
Organizerの [Select a method for distribution] 画面で [Custom] を選択すれば、Xcode 14までと同じフローでApp Storeへアップロードすることができました。
Xcode 15の新機能:Streamlined Distribution
![](https://assets.st-note.com/img/1696672888970-1T7uHZsUv3.png?width=1200)
ところで、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)
また、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
さらに、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を取得しようとしているのではないかと思います。
![](https://assets.st-note.com/img/1696673001211-F5s0168jkZ.png?width=1200)
ところが、今回エラーが発生したアカウントでは運用の都合上、App Store Connectのユーザ設定で証明書、ID、プロファイルへのアクセス権限をOFFにしていました。そのため、Provisioning Profileの取得に失敗したのだと推測しています(公式ドキュメントの記述が見当たらず、実際に検証もできていないため、確定情報ではありません)。
なお、証明書、ID、プロファイルへのアクセス権限がONになっているかどうかは、App Store Connectの [ユーザとアクセス] にある各ユーザの設定画面で確認できます。[Certificates, Identifiers & Profiles(証明書、ID、プロファイル)へのアクセス。] と書かれているチェックボックスです。
![](https://assets.st-note.com/img/1696590731372-0N0eB0cCwg.png?width=1200)
宣伝
NTTレゾナントテクノロジーでは一緒に働いてくれるAndroid/iOSアプリエンジニアを募集中です。もし興味がありましたら採用ページを是非ご覧ください。
(文:NTTレゾナントテクノロジー 西添)