Try calling this method. [[UIApplication sharedApplication] enabledRemoteNotificationTypes]
It will return a UIRemoteNotificationType that you can work with to determine what is available.
UIRemoteNotificationType status = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
int, NSLog(@"status = ", status);, , . UIRemoteNotificationType.
typedef enum {
UIRemoteNotificationTypeNone = 0,
UIRemoteNotificationTypeBadge = 1 << 0,
UIRemoteNotificationTypeSound = 1 << 1,
UIRemoteNotificationTypeAlert = 1 << 2,
UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3
} UIRemoteNotificationType;
, , , ...
- , 1
- , 2
- , 4
- Newsstand, 8 ( )
, , //. UIRemoteNotificationType (, ) 7.
. , status == 5. , , , ( 1, 4, 5) .
, status == 6? , , , , , .
IF, -
If (status == 5)
{
NSLog(@"User has sound alerts disabled");
[self fireThatSpecialMethod];
}
, , . , , !