Check if Local Notifications are enabled in IOS 8

You can check it by using UIApplication 's currentUserNotificationSettings

if ([[UIApplication sharedApplication] respondsToSelector:@selector(currentUserNotificationSettings)]){ // Check it's iOS 8 and above
    UIUserNotificationSettings *grantedSettings = [[UIApplication sharedApplication] currentUserNotificationSettings];

    if (grantedSettings.types == UIUserNotificationTypeNone) {
        NSLog(@"No permiossion granted");
    }
    else if (grantedSettings.types & UIUserNotificationTypeSound & UIUserNotificationTypeAlert ){
        NSLog(@"Sound and alert permissions ");
    }
    else if (grantedSettings.types  & UIUserNotificationTypeAlert){
        NSLog(@"Alert Permission Granted");
    }
}

Hope this helps , Let me know if you need more info


To expand on Albert's answer, you are not required to use rawValue in Swift. Because UIUserNotificationType conforms to OptionSetType it is possible to do the following:

if let settings = UIApplication.shared.currentUserNotificationSettings {
    if settings.types.contains([.alert, .sound]) {
        //Have alert and sound permissions
    } else if settings.types.contains(.alert) {
        //Have alert permission
    }
}

You use the bracket [] syntax to combine option types (similar to the bitwise-or | operator for combining option flags in other languages).


Swift with guard:

guard let settings = UIApplication.sharedApplication().currentUserNotificationSettings() where settings.types != .None else {
    return
}

Here is a simple function in Swift 3 that checks whether at least one type of notification is enabled.

Enjoy!

static func areNotificationsEnabled() -> Bool {
    guard let settings = UIApplication.shared.currentUserNotificationSettings else {
        return false
    }

    return settings.types.intersection([.alert, .badge, .sound]).isEmpty != true
}

Thanks Michał Kałużny for the inspiration.