xcode 缺少推送通知权利。应用签名的权利不包括“aps-environment”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30525273/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:12:56  来源:igfitidea点击:

Missing Push Notification Entitlement. the app signature's entitlements do not include the "aps-environment"

iosobjective-cxcodeapple-push-notificationsprovisioning-profile

提问by Michel

I am now working on an app using Apple Push Notification.

我现在正在使用 Apple Push Notification 开发一个应用程序。

And as far as testing goes, it works fine, but Apple keeps emailing me the message below.

就测试而言,它运行良好,但 Apple 不断向我发送以下消息。

I have read on the net, and done as much as I can to avoid this. My App ID is enabled for Push Notification, regenerating my Provisioning Profile (a number of times), refreshing my Accounts in Xcode Preferences and …. But it keeps coming whatever I do. Am I missing some point? Or should I just ignore it? I fear if I ignore it my app may be rejected.

我已经在网上阅读,并尽我所能避免这种情况。我的 App ID 已启用推送通知,重新生成我的配置文件(多次),在 Xcode 首选项中刷新我的帐户和......。但无论我做什么,它都会不断出现。我错过了什么吗?还是我应该忽略它?我担心如果我忽略它,我的应用程序可能会被拒绝。

Anyone with a similar experience?

有类似经历的人吗?

Dear developer,

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

亲爱的开发者,

我们发现您最近的“TheAppABC”交付存在一个或多个问题。您的交付成功,但您可能希望在下次交付时更正以下问题:

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

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

问候,

应用商店团队

回答by Sudhan

This messages shows up when the AppId used for provisioning doesn't added up with Push Notification services.

当用于配置的 AppId 未与推送通知服务相加时,会显示此消息。

Hope you created AppId without Push services and created mobile provisioning with it, later you added up with push services, forget to recreate the mobile provision with it. And you didn't mention about your APNS Certificate. And also you must do exact same thing you did on development process for distribution process...

希望你创建了没有推送服务的 AppId 并用它创建了移动供应,后来你添加了推送服务,忘记用它重新创建移动供应。而且你没有提到你的 APNS 证书。而且你必须做与你在分销过程的开发过程中所做的完全相同的事情......

Please follow this link, hope this helps:
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1

请点击此链接,希望对您有所帮助:http:
//www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1

I don't think they will reject the app, but Push Services will not work...

我不认为他们会拒绝该应用程序,但推送服务将不起作用...

It should look like this if everything is added perfectly:

如果一切都完美添加,它应该是这样的:

you should see aps-environment

你应该看到 aps-environment