当我的应用程序刚刚安装完毕后,系统会提示我允许使用
进行推送通知[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)];
假设我选择“不允许”。
当我进入iPhone settings > Notifications
时,我发现我的应用程序位于“通知中心”组中,而不是“不在通知中心”组中。
如果我点按我的应用,一切都已开启。通知中心处于打开状态,警报样式为“横幅”,并且“徽章应用程序图标”和“声音”均已启用。为什么会这样?
此外,如果我运行此代码:
UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
我得到(UIRemoteNotificationType) types = UIRemoteNotificationTypeNone
。
为什么所有这些都不一致。
感谢您的帮助。
顺便说一下,我正在运行IOS 6.1.3
。