Flutter iOS

【Flutter】ITMS-90078: Missing Push Notification Entitlement で警告を受けた時の対応【iOS】【App Store Connect】

【Flutter】ITMS-90078: Missing Push Notification Entitlement で警告を受けた時の対応【iOS】【App Store Connect】

背景

2022年にFlutterで開発したiOSアプリをリリース申請したときに、メールで受け取った警告になります。以下メールの抜粋です。

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.

原因

英文を読む限りですが、Push 通知を使うように見えるが、Push通知の権限が設定されてないですよといったものが原因に当たると考えられます。

今回、Push通知を行うな実装はしていないが、FlutterのアプリではライブラリなどがPush通知を使うような動きをしているのでしょうか...。詳しくは不明です。ちなみに調べたところUnityアプリでも同様の理由で警告を受けている方がいたようです。

解決方法

Xcodeを開きます。

Runner > Runner > Signing & Capabilities > + Capavilityと順番に選択します。

そうすると、以下のダイアログが出てくるので、「Push Notifications」を追加します。

これで、対応完了です。

再度ipaファイルをアップロードしましょう。

-Flutter, iOS