最近開發的cordova應用,要做ios的適配,並且發布版本,但是有一次在發測試版本的時候,突然收到一封郵件警告,原文如下:
Missing Push Notification Entitlement - Your app appears to include API used 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. 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.
看了看,雖然提示可以忽略,官網也有提到,並不影響審核的通過,但是對於有強迫症的人來說,總收到這樣的郵件,每發一回就會有一回警告,心里總感覺有點不舒服!
廢話不多說,直接上解決方案:
首先看郵件就知道問題所在,你的App IDs中打開了Push Notification功能,也就是推送,但是在軟件中並沒有用到推送這個功能,這里有兩種方法:
以后要是用到了推送功能,直接刪掉這句話就行了,方便快捷,還好記!推薦用第二種方法!