Ionic - 缺少推送通知权利

Chr*_*ton 1 ios cordova ionic-framework ionic app-store-connect

我有两个 Ionic 应用程序。我有一个我不久前提交的就好了。现在,当我在另一个应用程序上提交构建时,我不断收到此错误。

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.
Run Code Online (Sandbox Code Playgroud)

所以我尝试了很多东西:它们都可以在这里找到 我尝试了前 3 个响应。

  1. 我注释掉了 AppDelegate.m 中的所有推送通知
  2. 我注释掉了代码并将属性设置preprocessor为禁用
  3. 我在我的项目中搜索了所有推送通知实例
  4. 我把我的好应用程序复制了 AppDelegate.m 并将其粘贴到坏应用程序中。
  5. 我删除了所有本地配置文件。

所以当我不久前制作我的应用程序时,它问我是否想要推送通知。我记得清楚地说NO。

任何帮助将不胜感激!

我在想也许我只需要用 .bak 制作应用程序,然后重新创建应用程序并复制我的代码?这绝对是最后的手段。

Jos*_*hea 7

如果您的应用程序不使用 Apple 推送通知服务,则无需执行任何操作。

一段时间以来,我在提交基于 Cordova/Ionic 的 iOS 应用程序时收到了相同的警告消息。无需任何操作,也不会影响应用审批。

  • 我对此感到非常恼火,幸运的是找到了这个答案,点赞!以下是有关如何删除导致 Apple 向您发送电子邮件的代码的官方文档的链接:https://capacitor.ionicframework.com/docs/apis/push-notifications/ (3认同)