ios - 缺少推送通知权利

标签 ios notifications apple-push-notifications

提交二进制构建后,我收到了来自 Apple 的警告邮件。

    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.

我没有使用推送通知或任何第三方框架,如 Coredova,但我不确定为什么我会一次又一次地收到此警告。我浏览了以下链接,但到处都是第三方框架问题。

我不想启用推送通知服务,因为我不会在我的应用程序中使用它。任何帮助修复此警告将不胜感激。提前致谢。

注意:我已经多次尝试删除并重新创建我的配置文件和证书。

Missing Push Notification Entitlement warning

Missing Push Notification Entitlement

IOS Missing Push notification entitlement

最佳答案

我很确定这是 Apple 检查系统中的错误。我昨天上传了一个应用程序并收到了这条消息。这个应用程序已经更新了至少 30 次,没有任何问题。我没有在上一个版本中添加任何推送通知代码,也没有使用任何可能导致此消息的框架,如 PhoneGap 或 Cordova。它不会出现在设备的通知下。

我在应用程序中搜索了推送通知代码,但没有找到任何内容:

grep -r "registerUserNotificationSettings".
grep -r "registerForRemoteNotificationTypes"。

我终于尝试上传了 7 月批准的先前版本(并没有生成电子邮件)。这次我也收到了这个版本的警告邮件。所以我认为 Apple 是错误的,我会捕获机会,希望它能在警告的情况下获得批准。


编辑:在 Apple Developer Forum 中找到来自 Apple 员工的回复:

“该通知只是警告,不是拒绝。

应用程序验证器检查应用程序中 UIApplicationDelegate 方法 application:didRegisterForRemoteNotificationsWithDeviceToken: 的实现。如果您的应用委托(delegate)实现了该方法并且没有 aps-environment 授权,您将收到您描述的警告。

即使您的应用未对推送通知执行任何操作,您使用的第三方库也可能实现了该方法。在这种情况下,您可以忽略该警告。它可以让使用推送通知的开发人员知道他们是否可能错误地签署了他们的应用程序。”


编辑 2:我现在有两个不同的应用程序,尽管生成了警告电子邮件,但它们已获得批准,没有任何问题

关于ios - 缺少推送通知权利,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32251123/

相关文章:

iphone - undefined symbol : . objc_class_name_UIScreen

ios - 如何修改现有函数以将数据返回到变量

android - 使用应用通知 facebook 为我的应用邀请新用户

ios - iOS如何在Shared/AppGroup/xxx/Library/Sounds中播放自定义通知声音文件

ios - 为什么浏览器厂商无法在 iOS 上实现 WebPush?

iOS 深度链接 : how to embed URL in another URL?

ios - UIImageView 设置为 ASpectFill 时出现内容模式问题

java - 在Android中创建基于表插入的通知

ios - 如何在 APNS 的背景前景上使用相同的通知

iOS : Can I start my application with device restart using push notification?