【发布时间】:2015-02-20 07:41:24
【问题描述】:
如果我在我的设备上接受推送通知,并且不保存设备令牌,那么我如何在自定义视图中查看设备令牌或恢复警报视图?
我删除了应用程序并重新安装,但没有看到设备令牌警报视图,并撤消了权限,但没有看到警报视图
if ([application respondsToSelector:@selector(isRegisteredForRemoteNotifications)])
{
// iOS 8 Notifications
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert) categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
}
else
{
// iOS < 8
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
}
【问题讨论】:
-
我无法理解您的问题。请解释您的问题。
标签: ios apple-push-notifications devicetoken