ios - 将新版本上传到 iTunes 后,我收到了推送通知权利问题

标签 ios apple-push-notifications

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

主要信息在这里

If your app uses the Apple Push Notification service

但我没有添加任何推送通知 API 方法。

如何检查哪个库使用推送通知方法或框架?

最佳答案

这是Apple 验证软件中的错误。你可以忽略它。

来自 https://forums.developer.apple.com/thread/15011 :

I investigated this issue in MachO View to confirm it's a false-positive.

I could see that in AppDelegate.o - while there are no references to application:didRegisterForRemoteNotificationsWithDeviceToken: in the symbol table..

$ nm ./AppDelegate.o | grep    application:didRegisterForRemoteNotificationsWithDeviceToken  
$  

I did find the grep output matching, as confirmed in other commenters' reports.

$ grep application:didRegisterForRemoteNotificationsWithDeviceToken ./AppDelegate.o  
Binary file ./AppDelegate.o matches  

I loaded the binary into MachO View (see screenshot below) and found application:didRegisterForRemoteNotificationsWithDeviceToken:, application:didFailToRegisterForRemoteNotificationWithError: and ALL OF THE OTHER UIApplicationDelegate methods - in the __TEXT segment, __objc_methname section - the list of c string literals that store objc selector names

MachO View Screenshot of __TEXT,__objc_methname section with list of UIApplicationDelegate methods: http://imgur.com/JXgCjjm

I confirmed this finding with otool here:

$ otool -v -s __TEXT __objc_methname ./AppDelegate.o  | grep didRegisterForRemoteNotificationsWithDeviceToken  
000000000000bfbb  application:didRegisterForRemoteNotificationsWithDeviceToken:  

iTunes's review process is strings-based, not nm-based, so their simple grep for didRegisterForRemoteNotificationsWithDeviceToken will always register a false positive.

关于ios - 将新版本上传到 iTunes 后,我收到了推送通知权利问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32373584/

相关文章:

ios - 显示空白屏幕的webview屏幕截图

ios - Cocoapods - 安装 Mapbox-iOS-SDK 时出错

ios - 如何比较前缀 header 中的 $PRODUCT_NAME?

ios - 动态 UITableViewCell 不根据内容调整大小

ios - 当应用程序未运行时处理 JSON 推送通知解析

ios - didReceiveRemoteNotification 或 ReceivedRemoteNotification 从不触发

ios - 我们是否需要为每个应用程序更新一个新的 APNS 证书?

ios - 在 iOS 上打开多个 Realm 文件

ios - 如何以编程方式禁用 iOS 推送通知分组?

azure - Xamarin.iOS - 设备关闭时推送通知