2

当我的应用程序刚刚安装并提示我允许使用推送通知时

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
 (UIRemoteNotificationTypeBadge |
  UIRemoteNotificationTypeSound |
  UIRemoteNotificationTypeAlert)];

假设我选择“不允许”。当我进入时iPhone settings > Notifications,我发现我的应用程序位于“通知中心”组中,而不是“不在通知中心”组中。

如果我点击我的应用程序,一切都会开启。通知中心打开,警报样式为横幅,并且徽章应用程序图标和声音都打开。为什么会这样?

此外,如果我运行此代码:

UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];

我明白了(UIRemoteNotificationType) types = UIRemoteNotificationTypeNone

为什么所有这些都如此不一致。

谢谢你的帮助。顺便说一句,我正在跑步IOS 6.1.3

4

0 回答 0