获取iOS8上推送通知表 [英] Get the Push-Notification list on iOS8

查看:224
本文介绍了获取iOS8上推送通知表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能获得所有接收到推送通知的文字在iOS 8?

Is it possible to get the text of all the received push notifications on iOS 8?

有没有人发现,由苹果公司提供的文件上的东西吗?

Has anyone found something on the documentation provided by Apple?

我知道,可以使用蓝牙设备来获得通知列表,但我想获得在本地。

I know that the notification list can be obtained using a bluetooth device, but I'd like to get it locally.

推荐答案

它非常简单尝试这种在X $ C $ 6:

Its very simple try this in Xcode6:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    //-- Set Notification
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
        {
            [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
            [[UIApplication sharedApplication] registerForRemoteNotifications];
        }
        else
        {
            [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
             (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
        }

     //--- your custom code
     return YES;
}

这篇关于获取iOS8上推送通知表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆