您现在的位置: IOS教程網 >> IOS系統 >  >> iOS 程式開發 >> iOS 開發綜合

打包上傳時出現 Missing Push Notification Entitlement 怎麼辦

編輯:iOS 開發綜合

一、先看錯誤原文

最近打包上傳時收到這樣一段訊息:

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.

白話翻譯過來就是:你的 App 裡出現了蘋果推送服務的 API,但簽名中缺少 aps-environment 這項權利宣告。若確實要用推送,請到 Provisioning Portal 為 App ID 開啟 Push Notification,再用包含該權利的發佈描述檔重新簽名並重新上傳;若根本沒用到推送,則無需處理,也可以在後續版本中移除相關 API 以免再收到警告。如果是第三方框架帶進來的,則需聯絡對方。

另外,若你想更新這個 App,可以在 iTunes Connect 的 Binary Details 頁面拒絕這個二進位檔。要注意的是,一旦拒絕,你的版本會退出審核隊列,審查流程也得從頭再走一次。

二、根本原因

典型的情況是:App 本身不需要推送,但當初建立 App ID 時把推送能力勾了起來,卻又沒有相對應的推送證書。於是程式碼裡(或某個第三方 SDK 裡)出現了推送註冊的呼叫,簽名卻拿不出 aps-environment,警告就來了。

三、處理建議

如果只是單純不打算用推送,這個警告可以直接忽略,不影響審核結果,唯一影響的是推送功能本身無法使用。若日後確實要啟用推送,再回頭把 App ID 的 Push 開關與對應證書補齊即可。

  1. 上一篇文章:
  2. 下一篇文章:
蘋果刷機越獄教程| IOS教程問題解答| IOS技巧綜合| IOS7技巧| IOS8教程
Copyright © IOS教程網 All Rights Reserved