What is the size of the device token generated by APNs (Apple Push Notification). I am trying to store device tokens on the server side in a mysql database, and would like to know maximum size of device tokens generated
A device token is an identifier for the Apple Push Notification System for iOS devices. Apple assigns a Device Token on a per-app basis (iOS 7 and later) which is used as a unique identifier for sending push notifications.
Install either Xcode or iPhone Configuration UtilityHighlight your device name on the left, and go to the Console tab. Copy the above, remove spaces if present. This is your device token.
The Device Tokens are NOT unique to the phone-app pairing. They are unique to the phone only. If you have multiple apps with push on the same phone they will all use the same Device Token. The certificate you use to send the notification will dictate which app it goes to.
'The device token you provide to the server is analogous to a phone number; it contains information that enables APNs to locate the device on which your client app is installed. APNs also uses it to authenticate the routing of a notification. '
You get told but it's currently 32 bytes. Apple says the token length is variable and to not hard code it
When you get a notification it has a header, currently 35 bytes in size. This is arranged as follows:
Source: http://mark.aufflick.com/files/view/talks/apns.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With