typedef NS_OPTIONS(NSUInteger, UIRemoteNotificationType) { UIRemoteNotificationTypeNone = 0, UIRemoteNotificationTypeBadge = 1 << 0, UIRemoteNotificationTypeSound = 1 << 1, UIRemoteNotificationTypeAlert = 1 << 2, UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3,} NS_ENUM_AVAILABLE_IOS(3_0);
Uiremotenotificationtypenone = 0,
Uiremotenotificationtypebadge = 1,
Uiremotenotificationtypesound = 2,
Uiremotenotificationtypealert = 4,
Uiremotenotificationtypenewsstandcontentavailability = 8
Use uiremotenotificationtype = [[uiapplication
Sharedapplication] enabledremotenotificationtypes]; you can know the value of type. Based on the value of type, you can determine how the user sets the notification settings.
For example, if type = 3, the user opens uiremotenotificationtypebadge and uiremotenotiftypetypesound;
Type = 6, the user opens the uiremotenotificationtypesound and uiremotenotiftypetypealert,
And so on ~