📖

ITMS-90078: Missing Push Notification Entitlement

2024/05/22に公開

iosでアプリのリリース申請をしたときにappleから送られたメールにこのような警告文がありました。

メールの全文は以下です。

ITMS-90078: Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature's entitlements do not include the 'aps-environment' entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the 'aps-environment' entitlement. Xcode does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor's Capabilities pane, or manually add the entitlement to your entitlements file. For more information, see https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1.

google翻訳にかけると

プッシュ通知資格がありません - アプリは Apple プッシュ通知サービスに登録されているようですが、アプリ署名の資格に「aps-environment」資格が含まれていません。 アプリが Apple プッシュ通知サービスを使用している場合は、プロビジョニング ポータルでアプリ ID がプッシュ通知に対して有効になっていることを確認し、「aps-environment」資格を含むディストリビューション プロビジョニング プロファイルを使用してアプリに署名した後、再送信します。 Xcode は、ビルド時にプロビジョニング プロファイルから aps 環境資格を自動的にコピーしません。 この動作は意図的なものです。 この資格を使用するには、プロジェクト エディターの [機能] ペインでプッシュ通知を有効にするか、資格を手動で資格ファイルに追加します。 詳細については、https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1 を参照してください。

とのこと。アプリ内にプッシュ通知についての設定は何もしていなかったのですが、調べてみるとどうやらflutter製のアプリではよくあることらしい?

プッシュ通知の追加

昨年の記事ですがこちらがとても参考になりました。
https://prody03.com/missing_push_notification_entitlement/

私はAndroid Studioで開発をしていたので、Android Studioの"ios"ファイルをXcodeで開いて、TARGETSの下のRunnerをクリック → Signing & Capabilitiesを開く → すぐ下にある+ Capavilityから、"Push Notifications"を選んで追加。これで解決しました。

その後またappleにファイルをアップロードでOKでした。

終わり

記事を残してくださっている先人の皆様には感謝してもしきれません。いつもありがとうございます。

Discussion