原委
最近提交APP到Apple Store審核,結(jié)果很快就收到Apple很"貼心"的郵件.原文如下:
Dear developer,
We have discovered one or more issues with your recent delivery for "APP Name". Your delivery was successful, but you may wish to correct the following issues in your next delivery:
Missing Push Notification Entitlement - Your app includes an API for Apple's Push Notification service, but the aps-environment entitlement is missing from the app's signature. To resolve this, make sure your App ID is enabled for push notification in the Provisioning Portal. Then, sign your app with a distribution provisioning profile that includes the aps-environment entitlement. This will create the correct signature, and you can resubmit your app. See "Provisioning and Development" in the Local and Push Notification Programming Guide for more information. If your app does not use the Apple Push Notification service, no action is required. You may remove the API from future submissions to stop this warning. If you use a third-party framework, you may need to contact the developer for information on removing the API.
After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.
Regards,
The App Store team
大意就是你的APP包含APS推送而打包文件中卻沒(méi)有正確配置.可能原因Apple也提供了:
1.Provisioning Portal開(kāi)發(fā)者證書(shū)中心的配置文件可能有問(wèn)題
2.工程配置文件未啟用APS服務(wù)
解決方法
對(duì)應(yīng)Apple提供的解決方案,首先檢查證書(shū)中心.你的正式Profile和App ID應(yīng)當(dāng)設(shè)置正確,如下圖所示:
如果證書(shū)配置正確,再查看項(xiàng)目中的設(shè)置選項(xiàng),是否激活遠(yuǎn)程推送:
激活后項(xiàng)目中會(huì)多一個(gè)Entitlement文件,如下所示:
檢查一切無(wú)誤后就可以再次打包到App Store了.