【问题标题】:Missing Push Notification Entitlement in Cordova/MobileFirst AppCordova/MobileFirst 应用程序中缺少推送通知权利
【发布时间】:2017-03-22 19:40:00
【问题描述】:

我将我的应用提交到应用商店并收到以下警告:

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 8 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.

我检查了功能部分并在那里启用了推送通知。我还检查了以下权利文件的值:

Entitlements-Debug.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>application-identifier</key>
    <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
    <key>aps-environment</key>
    <string>development</string>
    <key>keychain-access-groups</key>
    <array>
        <string>$(AppIdentifierPrefix)worklight.group</string>
    </array>
</dict>
</plist>

权利-Release.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>application-identifier</key>
    <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
    <key>aps-environment</key>
    <string>development</string>
</dict>
</plist>

【问题讨论】:

    标签: ios xcode cordova xcode8


    【解决方案1】:

    尝试删除本地计算机上的 App Store 分发配置文件,然后从 Provisioning Portal 重新下载并安装分发配置文件。

    确保您的新分发配置文件包含 aps-environment 密钥。

    【讨论】:

    • 如何确保新的 Provisioning Profile 具有 aps-environment 密钥?
    • @Prera​​kTiwari,在生成 IPA 之前,确保您在 Entitlements plist 文件中有 aps-environment 密钥。
    猜你喜欢
    • 2014-11-27
    • 2015-11-23
    • 2015-11-28
    • 2015-11-21
    • 2018-09-27
    • 2016-07-09
    • 2015-12-01
    相关资源
    最近更新 更多