We should send a notification to the user for each new announcement. There are two possible approaches:
Use Background App Refresh (and/or background location updates once we merge in the Shuttle Tracker Network code) to poll the server for new announcements and to schedule a local notification if there is indeed a new announcement
Use remote push notifications
Each approach has unique benefits and downsides.
Local Notifications
The two key benefits of local notifications is that they are substantially easier to implement and don’t require any new server-side logic. The most notable downside is that the notification to users is delayed until whatever system background mechanism (such as Background App Refresh) that we choose decides to wake our app so that it can poll the server for new announcements.
We should send a notification to the user for each new announcement. There are two possible approaches:
Each approach has unique benefits and downsides.
Local Notifications
The two key benefits of local notifications is that they are substantially easier to implement and don’t require any new server-side logic. The most notable downside is that the notification to users is delayed until whatever system background mechanism (such as Background App Refresh) that we choose decides to wake our app so that it can poll the server for new announcements.
Push Notifications
The key benefit of push notifications is that they are nearly instantaneous, but they’re much more difficult to implement. We’ll need to set up a remote notification server and to register our app with APNs. For the server-side logic, we should probably use APNSwift.
I’ll create an issue in the Shuttle Tracker Server repository if we decide to pursue the push notifications approach.