我正在使用具有推送通知代码的第三方库。但是在我们的代码中,我们没有任何与推送通知相关的内容。所以我的配置文件没有启用 APNS。当我尝试将其推送到 iTunes Connect 进行 BETA 测试时,我收到了来自 Apple 的电子邮件。我现在的问题是我可以在启用 APNS 的情况下提交我的应用程序吗? 如果我这样做,Apple 会拒绝我的应用程序吗?
Dear developer, We have discovered one or more issues with your recent delivery for "Myapp Beta". 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
最佳答案
1) Click on your project in Xcode (near the upper left hand corner of Xcode)
2) then click on Capabilities (near the top in the middle of Xcode)
3) Scroll down to Background Modes and expand to reveal the modes
4) Select Remote Notifications.
这样做会给你推送权利,因此应用程序提交应该没问题。 苹果不会知道你实际上没有使用推送通知,他们只会运行一个工具来检测你在应用程序中有推送通知处理代码但没有推送权限。执行以上 4 个步骤应添加权利。
希望这应该足够了,但是您可能还需要在您的配置文件中启用推送通知。这很容易做到,最好的整体推送指南告诉你如何做到这一点: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
关于ios - Apple Push Notifications - 应用商店提交,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30335650/