3
votes

Hi i am little bit confusion about Device Token so can any one guide me. I am using following code for getting DeviceToken. - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)dt { }

The above code is working fine and it is showing DeviceToken data ,that is 64 length data. My doubt is Device Token is different from one device to another device.

If once we got DeviceToken using one device that same DeviceToken can use for another Device.

1

1 Answers

1
votes

Of course the device token is different for each device. It identifies a unique device. It's like a phone number (actually it's even more unique than a phone number, since multiple phones can have the same phone number). If it was the same, how would the Apple Push Notifications server know to which device to send your notification?