OStack程序员社区-中国程序员成长平台

标题: ios - 将新版本上传到 iTunes 后,我收到推送通知权利问题 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 10:17
标题: ios - 将新版本上传到 iTunes 后,我收到推送通知权利问题

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 "rovisioning 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 方法。

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



Best Answer-推荐答案


这是 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/






欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) Powered by Discuz! X3.4