缺少推送通知权利警告 [英] Missing Push Notification Entitlement warning

查看:39
本文介绍了缺少推送通知权利警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经创建了一个应用 ID、分发证书和配置文件.最初未启用推送通知.

我们现在需要在应用中实现推送通知.

我们在 App D 中开启了推送通知,检查配置文件,配置文件无效,更新它,并下载最新的配置文件以备下次使用.

然后,我们在代码中通过 APNS 集成用于推送通知的 API.

在 iTunesConnect 中上传应用程序后,我们收到来自 Apple 的以下电子邮件:

<块引用>

亲爱的开发者:

我们发现您最近交付的Swanvi"有一个或多个问题.您的交付成功,但您可能希望在下次交付时更正以下问题:

缺少推送通知权利 - 您的应用似乎包含用于注册 Apple 推送通知服务的 API,但应用签名的权利不包括aps-environment"权利.如果您的应用程序使用 Apple 推送通知服务,请确保您的 App ID 在配置门户中启用推送通知,并在使用包含aps-environment"的分发配置文件对您的应用程序进行签名后重新提交.权利.参见供应和开发"在本地和推送通知编程指南中了解更多信息.如果您的应用程序不使用 Apple 推送通知服务,则无需执行任何操作.您可以从以后的提交中删除 API 以停止此警告.如果您使用第三方框架,您可能需要联系开发者获取有关移除 API 的信息.

纠正问题后,您可以使用 Xcode 或 Application Loader 将新的二进制文件上传到 iTunes Connect.

我们重新检查了应用 ID.为开发和生产启用推送通知.

在配置文件中,显示了推送通知选项.

为什么我们会通过电子邮件收到此警告?

解决方案

您需要了解两件事:您的帐户在 Xcode 上使用的配置文件以及 developer.apple 上的配置文件

一切都与配置文件有关.

第 1 步:转到

第 2 步:删除您看到的与应用程序相关的任何 Invalid 配置文件(仅适用于您的应用程序的无效配置文件).我将在以下步骤中告诉您原因.

第 3 步:转到 Xcode -> 首选项 -> 查看详细信息(对于您的帐户)-> [可选:为了确保无效的一个已经消失,rt-单击任何配置文件,选择在 Finder 中显示",然后删除/移动所有配置来自该文件夹的配置文件.] 现在单击下载所有配置文件.这将用当前的配置文件替换本地配置文件.点击完成.

第 4 步:转到您的应用程序目标 -> 构建设置 -> 在代码签名中,展开您的配置文件以显示 DebugRelease 选项卡.默认情况下,它将处于自动状态(这就是为什么您的应用程序可能会自动使用我们刚刚在第 2 步中删除的无效配置文件).对于 Release,为了更安全,请选择 Active 配置文件并启用推送通知,如步骤 1 所示.

就是这样.

你现在不应该收到任何电子邮件.

We have created an App ID, distribution certificate and provisioning profile. Push Notifications were not initially enabled.

We now need to implement Push Notifications in the app.

We have enable Push Notifications in the App D, check the provisioning profile, the provisioning profile was invalid, updated it, and downloaded the latest provisioning profile to use it for next time.

We then integrate the APIs for Push Notifications via APNS in our code.

After uploading the app in iTunesConnect, we get the following email from Apple:

Dear developer,

We have discovered one or more issues with your recent delivery for "Swanvi". 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.

We have re-checked the App ID. Push Notifications are enabled for development and production.

In the Provisioning Profile, the Push Notifications option is shown.

Why are we getting this warning via email?

解决方案

You need to see 2 things: The provisioning profiles used by your account on Xcode and the ones on developer.apple

Its all about the provisioning profiles.

STEP 1: Go to https://developer.apple.com/account/ios/certificate/ and see the Active iOS Distribution Provisioning Profiles you need for your app. Then click on it and make sure Enabled Services has Push Notification enabled. If it doesn't then click on edit and enable it by following the steps provided by Apple. If it is enabled then perfect.

STEP 2: Delete any Invalid Provisioning Profiles you see related to app (just the invalid ones for YOUR app). I'll tell you why in the following steps.

STEP 3: Go to Xcode -> Preference -> View Details (for your Account) -> [OPTIONAL: To be sure invalid one is gone, rt-click on any provisioning profile, select "Show in Finder", then Delete/Move all the provisioning profiles from that folder.] Now click Download All Profiles. This will replace local provisioning profiles with current ones. Click DONE.

STEP 4: Go to your app Targets -> Build Settings -> In Code Signing, expand your Provisioning Profile to show Debug and Release tabs. By default it will be on Automatic (which is why your app was probably automatically using the invalid profile that we just deleted in step 2). For Release, to be on a safer side, select the Active Provisioning Profile with enabled Push Notifications as seen on step 1.

That's it.

You shouldn't get any emails now.

这篇关于缺少推送通知权利警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆