It is widely known that:
- app doesn't receive push notification if it is in background or offline mode (app gets it once after user's action: tap on notification or app icon).
- Apple push Notification service keep only ONE last notification when device is offline. Once device is connected to internet, APNs sends the last notification.
How to solve this?
- very latest notification that just reached the app (not device) must reflect the actual number of notifications that are not implemented in the app yet. So, then I can download from the server last
n
notifications and implement them in the app at any time.
The question is:
How the server knows what notifications were implemented in the app, and which one not?
Notifications must be per device. Why? For instance, notification "remove object from Core Data" must be implemented in every device. Because only one user can be logged in on multiply devices at time.