"Missing Push Notification Entitlement"警告-----以及解決方法


最近開發的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功能,也就是推送,但是在軟件中並沒有用到推送這個功能,這里有兩種方法:
1.你可以登陸到開發者中心https://developer.apple.com,找到相應應用的App IDs,點擊Edit,關閉Push Notifications功能。如下圖 "Missing <wbr>Push <wbr>Notification <wbr>Entitlement"警告-----以及解決方法
2.要是用第一種方法的話,以后要添加這個功能的時候還要重新設置,重新編輯修改app ids,然后重新生成證書,有點麻煩。相比之下,第二種方法就沒有那么麻煩了,只需要在xcode中添加一句話就行,如下 "Missing <wbr>Push <wbr>Notification <wbr>Entitlement"警告-----以及解決方法
以后要是用到了推送功能,直接刪掉這句話就行了,方便快捷,還好記!推薦用第二種方法!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM