Hi
I am building an app that uses the fine Urban Airship api to send the user push notifications.
The app keeps track of event dates that are added to the app by the user. This means I have no server in place for dealing with push, the app itself simply schedules a push notification with Urban AS when the user add the event date and time.
If the user decides to delete the event before it occurs I un-schedule it with Urban AS. All is good. I, however, would like to not send notifications to a user that has disabled notifications as these notifications are no free:)
I know the Push Notification API from Apple makes sure the user will not receive any notification if they turned them off in settings. They will simply ignore the scheduled notifications Urban AS sends, which is a waste of bandwidth and money.
How can I tell if the user has disabled the notification for my app?
Also, I see no other option than to test if the user has turned off notification and then tell Urban AS to cancel all notifications and if the user turns them back on, I will have to go through all events and re-scheduled them :/ each time the app runs.
Can anyone think of a way for me not to have to fill up my appDelegate with all kinds of conditional code for testing these scenarios? e.g. user has turned off push since last running the app, user has turned them on since last time. I am also concerned if the user will understand this behavior?
Guess I am just asking for a bit of best practice with this push / Urban Airship setup:) Thanks.