简体   繁体   English

Cordova / MobileFirst App中缺少推送通知权利

[英]Missing Push Notification Entitlement in Cordova/MobileFirst App

I submitted my app to app store and I got the following warning: 我将应用提交到应用商店,并收到以下警告:

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.

I checked into the capabilities section and Push Notification is enabled there. 我检查了功能部分,并在其中启用了推送通知。 Also I checked into the entitlements file following are values: 我还签入了权利文件以下是值:

在此处输入图片说明

Entitlements-Debug.plist 权利-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>

Entitlements-Release.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>

Try with deleting the App Store distribution profile on your local machine, then re-download and install the distribution profile from the Provisioning Portal. 尝试删除本地计算机上的App Store分发配置文件,然后从Provisioning Portal重新下载并安装分发配置文件。

Make sure your new distribution profile contains aps-environment key. 确保新的分发配置文件包含aps-environment密钥。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM