本文介绍了application:didReceiveLocalNotification从未在ios 8上调用过的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否存在任何已知问题:
Is there any known problem issue with:
application:didReceiveLocalNotification delegate
我的应用程序使用 UILocalNotification创建本地通知
。当应用程序在后台时,我收到通知,当我点击通知横幅时,它会移动到我的应用程序。但是这个方法:
My application creates local notifications using UILocalNotification
. When application is in background I get notifications, and when I click on the notification banner, it moves to my app. But this method:
-(void) application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
永远不会在iOS 8(Xcode 5.1.1)上调用,但在iOS 7或更早版本上运行良好。
is never called on iOS 8(Xcode 5.1.1), but works well on iOS 7 or earlier.
PS我还测试了这个站点的项目:
,它在iOS 8上不起作用。
P.S. I've also tested project from this site:http://www.appcoda.com/ios-programming-local-notification-tutorial/ and it doesn't work on iOS 8.
推荐答案
用于iOS8
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification completionHandler:(void(^)())completionHandler{
}
这篇关于application:didReceiveLocalNotification从未在ios 8上调用过的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!