如何知道iOS中推送通知的内容?

时间:2016-02-03 04:46:11

标签: ios apple-push-notifications

我无法使用NSLog,因为模拟器不支持推送通知。如何查看来自推送通知的数据以及该launchOption字典中的内容?

1 个答案:

答案 0 :(得分:1)

首先,您希望真实设备检查推送通知。

在ios中有一种检查推送通知内容的方法

- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
{
        NsLog("%@",userInfo);//In the userinfo you will get the content of push notification.
}

可能会帮助你。