I faced this scenario when I was testing push notifications on iOS.
when user register to receive remote notification. He add list of conditions when achieved the user should receive a notification. I keep this list of conditions on sqlite file on device. If the user deleted the app, this list is gone.
What is the best approach to handle this:
- Keep the conditions list on server so if user re-installed the app he
can get the last list using his device token and continue receiving
notification from server. - If user deleted the app and reinstalled it, he should not see the old
notifications.
I would appreciate your help,
thanks in advance
This is a good choice.
Keep a flag in the default plist as NO. on first start check if the user has already read notifications in the server using device token. then set flag to YES. So when next time user re-installs the app, you can provide the latest notifications as the list of already read notifications are safe on your server.
Happy coding