Here is our scenario,
- get the 'deivice_token' each time when user register to our app.
- send push notifications from back-end server to the registered 'device_token'
What happen :
Our test case : Our app allows multiple registrations (Same user can register more than one time)
- Register new user -> "assume the device_token is device_token_1 and email is email@example.com".
- Uninstall the app or, logout and register same user again. now the device token is difference -> "assume the device_token is device_token_2 and email is firstname.lastname@example.org".
- Now the active device's device_token is device_token_2.
- from back-end we send push notifications to the user using email. in here to email@example.com (two device_tokens for the same user and only one is active).
- Even active device_token is not the device_token_1, two push notifications comes to the device. (for device_token_1 and device_token_2).
NOTE : same scenario with the Android working properly. it only gets the active token and send the push notification to that.