I am trying to detect the Local notification settings for the App in iOS 8
for UIUserNotificationSettings, it returns me 7 as I have turned on all Badge
I apologize for this answer/comment if it is in the wrong place. I am REALLY new at iOS programming and have never posted to stack overflow before. I think this should actually be a comment, but without a 50 rating I am not allowed. I also apologize if the explanation is somewhat rudimentary, but again, kind of new :).
I also wished to test for whether a user has changed what notifications are allowed/required by my app after the initial request. After trying to decipher the Apple documentation (the writers at Apple are either much smarter than I am, or the documentation is purposely obscure) and doing a bit of testing I tested for the value of
[[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 alert
100 = 4 = only alert notifications
and so on until,
111 = 7 = all notifications on.
This also shows 0 if Allow Notifications is turned off in the Settings app. Hope this helps.