gpt4 book ai didi

android - 不使用推送通知的 Cordova 应用程序 : "Missing push notification entitlement"

转载 作者:IT王子 更新时间:2023-10-28 23:52:12 26 4
gpt4 key购买 nike

我们有一个基于 Cordova 的 iOS 应用程序,它不使用推送通知。从 Cordova 3.5.0 开始,我们向应用商店提交的每个内容都会生成一封电子邮件,通知我们我们的应用包含用于注册 Apple 推送通知服务的 API,但没有推送通知权利。

该应用程序每次都被接受,因为我们实际上并没有将推送通知用于任何事情。但是,如果 Apple 决定更改其关于这些 API 引用是否可接受的政策,我想避免触发此警告。

我们在 Cordova 的早期版本中没有遇到过这个问题,并且我们自己也没有在 Objective-C 中做过任何工作。这是 Cordova 3.5 的已知问题吗?搜索已经产生了一些有类似问题的人,但我只为想要添加推送权利的人找到了解决方案(而不是找出引用推送 API 的位置并删除它)。我查看了 Cordova issues ML,但没有找到任何东西。人们知道的任何其他线索将不胜感激!

使用的插件:
org.apache.cordova.console
org.apache.cordova.device
org.apache.cordova.file
org.apache.cordova.inappbrowser
org.apache.cordova.media
org.apache.cordova.network-信息
org.apache.cordova.splashscreen

相关电子邮件 fragment ,具体信息替换为 [ ]:

From: iTunes Store
Date: Wed, Sep 17, 2014 at 3:49 PM
Subject: iTunes Connect: Your app "[appName]" (Apple ID: [id]) has one or more issues
To: [developer]

Dear developer,

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

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.

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

最佳答案

如何通过 XCODE UI (6.1) 做到这一点:

在注释掉 Classes\AppDelegate.m 中的违规代码时将使您的应用程序获得批准,您希望继续从 future 的 Cordova 升级中受益,因此最好的方法是打开 DISABLE_PUSH_NOTIFICATIONS编译期间的符号,所以这部分代码被忽略了。

我来自 C# 背景,所以我了解条件编译,但我是 XCode 的新手,所以我不得不做一些研究以了解如何通过 UI 定义编译符号。

原来神奇的词是“预处理器宏”。这就是您如何以图形方式完成此操作(请注意,这是在 XCode 6.1 中完成的方式):

enter image description here

希望这可以帮助其他处于相同情况的人。

关于android - 不使用推送通知的 Cordova 应用程序 : "Missing push notification entitlement",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26168713/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com