0

我想知道用户是否已经启用了 pus 通知,如何做到这一点?

我试过这个..

  UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
  if (types ==  UIRemoteNotificationTypeNone){

       NSLog(@"Push is off");

    }

但它不起作用,“类型”总是给出值“7”

4

1 回答 1

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.
于 2013-04-04T10:38:14.293 回答