handleActionWithIdentifier:forLocalNotification:使用ios中的交互式推送通知加载URL

时间:2015-01-06 05:16:58

标签: objective-c ios8 apple-push-notifications openurl

我目前正在使用ios 8中的交互式推送通知。我正在添加一个UIMutableUserNotificationAction来加载网站网址,然后我在handleActionWithIdentifier: forLocalNotification: method中使用以下代码:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.google.com"]];

在点击按钮(NotificationAction)时加载网址,但在加载网址之前,它会将应用程序带入Foreground。 在点击按钮(NotificationAction)后,是否有可能在不将应用程序带到前台的情况下加载URL。有谁能告诉我如何解决这个问题?

0 个答案:

没有答案