Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple push notification service device token

I am utilizing the apple push notification service in my application. I know that the device token sent from Apple server is unique for a device. If I uninstall my app and install it again register for push service,will this device token remain the same for that device for the same app? How does Apple generate a device token for a device?

like image 521
divya Avatar asked Apr 28 '26 17:04

divya


1 Answers

Quoted from Apples Local and Push Notification Programming Guide

By requesting the device token and passing it to the provider every time your application launches, you help to ensure that the provider has the current token for the device. If a user restores a backup to a device other than the one that the backup was created for (for example, the user migrates data to a new device), he or she must launch the application at least once for it to receive notifications again. If the user restores backup data to a new device or reinstalls the operating system, the device token changes. Moreover, never cache a device token and give that to your provider; always get the token from the system whenever you need it

like image 82
manujmv Avatar answered Apr 30 '26 07:04

manujmv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!