我想知道用户是否已经启用了脓通知,该怎么做?
我试过这个..
UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
if (types == UIRemoteNotificationTypeNone){
NSLog(@"Push is off");
}
但它不起作用,“类型”总是给出值“7”
答案 0 :(得分:0)
UIRemoteNotificationType
类型:
0 - None
1 - Badge,
2 - Sound,
4 - Alert,
5 - Badge & Alert Only,
6 - Alert & Sound Only,
7 - All Badge,Sound,Alert.
8 - NewsstandContentAvailability.