Reputation: 187
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?
Upvotes: 3
Views: 6055
Reputation: 143
Okay, First, if you uninstall and reinstall your app that device token won't be changed. Device token only changed from you reinstall Device iOS and register your device ( reset for all new ). So, when users just reinstall the app, that device token won't be changed. This's my experience.
Upvotes: 1
Reputation: 6445
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
Upvotes: 3