For the life of me I cannot figure this out....
How do I interrogate UIUserNotificationType returned from UIApplication.sharedApplication().currentUserNotificationSettings().types?
UIUserNotificationType is a RawOptionSetType
UIUserNotificationType.None
UIUserNotificationType.Badge
UIUserNotificationType.Sound
UIUserNotificationType.Alert]
It seems that every possible combination or permutation of the 4 values can be returned in the types variable based on whatever the current App notification settings are?
I just want to interrogate or query the returned types variable and see if UIUserNotificationType.Sound is turned on/off or true/false.
I don't want to resort to using currentUserNotificationSettings().hash and guess at getting the bits for each compination of values!
Below is the ugly / scary way to do it from Stackoverflow, I don't want to do that!
[[UIApplication sharedApplication] currentUserNotificationSettings].hash.I believe that this returns a three bit hash value where bit one is for Banner notifications, bit 2 is for Sound notifications, and bit 3 is for Alert notifications.
So...
000 = 0 = no notifications.001 = 1 = only banner,010 = 2 = only sound,011 = 3 = sound and banner, no alert100 = 4 = only alert notifications and so on until,111 = 7 = all notifications on.