iOS 6 use of UDIDs for push notifications forbidden?

岁酱吖の 提交于 2020-01-05 06:50:55

问题


Starting May 1st, 2013, Apple will stop accepting apps that access unique device identifiers (UDIDs). Sounds like didRegisterForRemoteNotificationsWithDeviceToken:, will no longer get passed a UDID as the device token; but so far, this doesn't seem to be the case in iOS 6.0.

To get around the issue and hedge the risk of my app getting rejected, I found this S.O. question, where they suggest using ASIdentifierManager to check if the user has enabled ad tracking for the app and then get the advertisingIdentifier, and use it as the device token. Should I be doing that inside registerForRemoteNotificationTypes before registering the device for push notifications on my servers or simply trust whatever I get passed as deviceToken?


回答1:


I see no need for you to be switching so eagerly away from UDIDs. Apple is explicitly removing applications that use UDIDs, however the APS system doesn't use UDIDs, it uses device tokens. From the documentation on that method:

deviceToken

A token that identifies the device to APS. The token is an opaque data type because that is the form that the provider needs to submit to the APS servers when it sends a notification to a device. The APS servers require a binary format for performance reasons.

Note that the device token is different from the uniqueIdentifier property of UIDevice because, for security and privacy reasons, it must change when the device is wiped.

All is well in APNS-land. Carry on.



来源:https://stackoverflow.com/questions/15561450/ios-6-use-of-udids-for-push-notifications-forbidden

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!