unagirabbit's blog

気づいたことをメモしています

Ad-hocのProvisioningProfileではTestFlightが使えない?

久しぶりにTestFlightでAd-hocのアプリを配布しようとしたら詰まったメモ
いつの間にかTestFlightはApp-storeのProfileじゃないと使えなくなってる?

環境

Xcode 11.2.1
Build Version 11B500

調査

Ad-hocのProfileを使い、
XcodeのOrganizerで作成したipaではとくに警告が表示されませんでしたが、
xcodebuildでexportしたipaではValidateで以下の警告が表示されます。

WARNING ITMS-90191: "Missing beta entitlement.
Your app does not include the beta-reports-active entitlement.
If you intend to distribute this build via TestFlight for beta testing,
please re-build this app with an App Store Distribution provisioning profile.
Do not use ad-hoc profiles."

どちらのアプリをアップロードしても、ステータスが[処理中]から変化ありません。
半年ほど前はAd-hocでもTestFlightが使えたと思うのですが、何か変わったのでしょうか?

このipaを再署名でbeta-reports-active = 1に書き換えると以下のエラーになります。
※exportOptionsでbeta-reports-activeを設定しても効果ありません。

ERROR ITMS-90163: "Invalid Code Signing Entitlements.
The entitlements in your app bundle signature do not match the
ones that are contained in the provisioning profile.
The bundle contains a key that is not included in the
 provisioning profile: 'beta-reports-active' in 'Payload/hoge.app/hoge'."

再署名についてはこちら
https://shashikantjagtap.net/ios-code-signing-4-provisioning-profiles/shashikantjagtap.net

Entitlementsについてはこちら Apple Developer Documentation - Entitlements
Entitlements | Apple Developer Documentation

App-storeのProfileでexportしたアプリは問題なくテスト可能な状態になりました。
AppStoreConnectから配信だからApp-storeのProfileじゃないとダメという事なのでしょうか。