Starting with iOS8, you need to register and request a user to use local notifications. Therefore, I would like to implement a way to double check these permissions.
How to check that the Local notifications settings are not defined / not set ? So far, I know how to verify that local notifications are provided or rejected , for example ...
var currentStatus = UIApplication.sharedApplication().currentUserNotificationSettings() var requiredStatus:UIUserNotificationType = UIUserNotificationType.Alert if currentStatus.types == requiredStatus { β¦
The problem with this is that I also got Denied , if nothing is installed yet. How can I differentiate all 3 cases?
- Provided (notification, warning type)
- Denied (notification, warning type)
- Undefined / Not yet installed (therefore, local notification application settings have not yet been created)
As an alternative solution, it would be useful to have a comparable delegate method for CoreLocation authorization didChangeAuthorizationStatus in order to respond to the user's choice in the permission warning. Is there something like this to get user interaction status with privacy notification for local notifications?
Bernd source share