How to interrogate UIUserNotificationSettings types How to interrogate UIUserNotificationSettings types objective-c objective-c

How to interrogate UIUserNotificationSettings types


Here you go

if (notificationSettings.types == UIUserNotificationTypeNone) {      NSlog(@"Permission not Granted by user");}else{      NSlog(@"Permission Granted");}

To interrogate a specific setting:

BOOL allowsSound = (notifSettings.types & UIUserNotificationTypeSound) != 0;