使用 OneSignal 的 Ionic App 中缺少推送通知授权问题

Missing Push Notification Entitlement Troubles in Ionic App using OneSignal

我在 Cordova 应用程序中使用 OneSignal API 推送通知。我的 android 正在接收通知,但 iPhone 没有,我收到了这封电子邮件:

Dear developer,

We have discovered one or more issues with your recent delivery for "----". Your delivery was successful, but you may wish to correct the following issues in your next delivery:

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.

Regards,

The App Store team

我的 App ID 已启用推送通知,我真的不明白为什么它不起作用。

您需要在项目设置中启用 "Push Notifications"。检查附加的屏幕截图。