-4

如何检查应用程序的 PushNotification 是否启用?

我知道我们可以通过设置->通知更改应用程序的推送通知设置。

在这里如何在 IOS 7 的 appcode 中检查这个?

4

1 回答 1

4

一旦你注册了推送通知(询问用户是否允许……)

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

您可以检查启用了哪些类型的推送通知:

UIRemoteNotificationType enabledTypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];

我希望这是你想要的……</p>

于 2013-08-29T13:11:02.163 回答