APNS device token become longer after iOS9.. so.. ...

HI ! ^ ^


APNS device token become longer after iOS9..


and my app has push service, and it is released 1 year and 10 monthes ago...


Do I have to change some code because APNS device token become longer after iOS9 ??


Or just leave my code as it is,and just push notification service as it is ??


Thanks 😁

Accepted Answer

The token is 100 characters long. If you store in a database, you need to check the database structure.

Legacy protocol supported 32 bytes tokens only. If device token becomes longer should we adopt a new HTTP/2 protocol to support lengthened tokens?

This is very important information that I'm trying to confirm from Apple document. As I read from this article, it seems that the token is variable length and you can specify in the 2-byte "Token Length" field. Very appreciate if you can share the source where you got this information.
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Appendixes/LegacyFormat.html#//apple_ref/doc/uid/TP40008194-CH105-SW1

Thanks

I strongly believe there is no mention of 100 bytes size of device token anywhere. It can be of variable length. However have not seen more than 64 bytes practically speaking.


As per Apple doc,


https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW9


"Important: APNs device tokens are of variable length. Do not hardcode their size."


Regards,

_Ayush

APNS device token become longer after iOS9.. so.. ...
 
 
Q