I have been reading Apple’s documentation on Local and Push Notifications. Technically speaking I understand both solutions. However, technical docs sometimes lack details that only experience can teach – and this is the reason why I’m here. I need to know what’s the best solution for my current problem.
What I need to do:
I need to implement a notifications system that triggers at specific pre-programmed dates, chosen by the user. These notifications should be synched accross devices, meaning the user can turn these notifications on/off from several devices (which share the user account for the app).
My question:
What’s the best way to implement this: local or push notifications?
My analysis:
Local notifications are much easier to set up, plus they should be enough to display pre-programmed notifications that don’t depend on server events. The problem is I would need to implement a custom synchronisation mechanism for all of the user’s devices through our server.
Push notifications seem a bit of an overkill to me. They are not really necessary for pre-programmed notifications and are possibly better fit for other types of notifications. On the bright side they seem to provide synchronisation across devices out of the box.
I was hoping to find one of the two methods I asked about was clearly superior to the other, but apparently you just have to pick one based on your scenario.
I’ll copy a snippet of what I posted above, that proved to be a good list of pros and cons.
PS: In our particular case we went with Local Notifications (we are synching them ourselves across devices when the app is running).
Wich method to pick:
Local notifications are much easier to set up, plus they should be enough to display pre-programmed notifications that don’t depend on server events. The problem is you will need to implement a custom synchronisation mechanism for all of the user’s devices through your server (if you want the app to run nicely on multiple devices for the same user). As pointed out in a comment by nickbona (above), a custom synch mechanism will only work while your app is running.
Push notifications seem a bit of an overkill and require more effort to set up. They are not really necessary for pre-programmed notifications and are possibly better fit for other types of notifications. On the bright side they seem to provide synchronisation across devices out of the box.