Flutter项目打包iOS出现 ITMS-90078 Miss
Flutter项目,打包iOS一直出现
ITMS-90078 Missing Push Notification Entitlement
的问题解决方案:
每次将Flutter应用打包iOS上传到App Store Connect之后,都会收到以下电子邮件警告,但不影响正常构建版本。但是烦躁,解决如下:
Dear Developer,
We identified one or more issues with a recent delivery for your app, "xxx" 1.1 (1). Your delivery was successful, but you may wish to correct the following issues in your next delivery:
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.
After you’ve corrected the issues, you can upload a new binary to App Store Connect.
Best regards,
The App Store Team
大意就是 缺少推送相关的配置信息,其实在开发者网站配置证书的时候一般都进行 ‘推送功能’ APNs 勾选,但是项目中暂未设置推送配置,所以警告。
思路两个方向:
- 一种就是开发网站中重新弄证书,不勾选 ‘推送APNs’功能,然后重新配置,但这样做麻烦,以后再用到推送功能,还得再重新来一遍。
- 一种就是我配置推送,但是我暂时先不用推送功能。如下图配置即可。Flutter项目再打吧iOS发到AppStore 不再报警告:
Xcode配置推送
然后相应的git管理会新增一个配置Runner.entitlements
,如下图:
推送元素表现形式.jpg
- 还查询其他同学处,还有一种思路:在
Targets--Build Settings -- Preprocessor Macros
配置环境变量DISABLE_PUSH_NOTIFICATIONS=1
,但是我在Flutter项目中测试,好像不起作用:
自测好像不起作用:DISABLE_PUSH_NOTIFICATIONS=1