缺少推送通知权利

Sas*_*i M 47 notifications apple-push-notifications ios

在提交二进制版本后,我收到了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.
Run Code Online (Sandbox Code Playgroud)

我没有使用推送通知或任何第三方框架,如Coredova,但我不知道为什么我一次又一次地收到此警告.我已经通过以下链接,但到处都是第三方框架问题.

我不想启用推送通知服务,因为我不打算在我的应用程序中使用它.任何帮助将不胜感激以解决此警告.提前致谢.

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

缺少推送通知权利警告

缺少推送通知权利

IOS缺少推送通知权利

Ste*_*ten 49

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

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

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

我终于尝试上传7月批准的以前版本(并且没有生成电子邮件).这次我收到了这个版本的警告电子邮件.所以我认为Apple错了,我会抓住机会,希望尽管有警告,它仍会被批准.


编辑:发现Apple开发者论坛的Apple工作人员的回复:

"这个通知只是一个警告,而不是拒绝.

应用程序验证程序在应用程序中检查UIApplicationDelegate方法应用程序的实现:didRegisterForRemoteNotificationsWithDeviceToken:如果您的应用程序委托实现该方法并且没有aps-environment权限,您将收到所描述的警告.

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


编辑2:我现在有两个不同的应用程序,虽然生成警告电子邮件,但没有任何问题被批准

  • 对我来说,我发现 Firebase 使用此方法,因此如果有人使用 Firebase 有此方法,请安全地忽略它。 (4认同)

Fer*_*aej 17

以下是您可能需要仔细检查的一些事项:

Apple开发者中心

标识符 > 应用程序ID部分中,如果不实现推送通知,则不应启用推送通知.

Apple开发人员中心:应用服务

每次启用或禁用服务时,您都必须生成新的移动配置.确保启用应用的服务中未列出推送通知:

在此输入图像描述

Xcode项目目标设置

在应用程序目标的" 功能"选项卡中,应关闭" 推送通知".

此外,在后台模式中,不应存在任何远程通知模式.

在此输入图像描述

应用代表

最后,确保您没有让您的应用程序委托注册远程通知,并且它没有实现任何远程通知委托方法.您应确保未调用或实现以下方法:

  • registerForRemoteNotifications()(registerForRemoteNotificationTypes()之前iOS 8.0)
  • unregisterForRemoteNotifications()
  • isRegisteredForRemoteNotifications()
  • application(_:didRegisterForRemoteNotificationsWithDeviceToken:)
  • application(_:didFailToRegisterForRemoteNotificationsWithError:)
  • application(_:didReceiveRemoteNotification:fetchCompletionHandler:)
  • application(_:handleActionWithIdentifier:forRemoteNotification:completionHandler:)
  • application(_:didReceiveRemoteNotification:)

希望有所帮助!

  • 我已经检查了上述所有内容,但这都不是问题的原因.但是,我仍然没有尝试生成任何新的配置文件. (6认同)

Ami*_*era 7

转到目标 > 功能,

启用推送通知应该没有任何问题,并且还应该启用后台模式。