我遇到firebase推送通知问题。 当应用程序处于后台模式时,当推送到来时,这2个功能同时调用
application(_ application:UIApplication,didReceiveRemoteNotification userInfo:[AnyHashable:Any],fetchCompletionHandler completionHandler:@escaping(UIBackgroundFetchResult) - >空隙)
func userNotificationCenter(_ center:UNUserNotificationCenter, didReceive响应:UNNotificationResponse,withCompletionHandler completionHandler:@escaping() - >无效){
当app for forground这两个方法叫做
func userNotificationCenter(_ center:UNUserNotificationCenter, willPresent通知:UNNotification,withCompletionHandler completionHandler:@escaping(UNNotificationPresentationOptions) - > 无效){
application(_ application:UIApplication,didReceiveRemoteNotification userInfo:[AnyHashable:Any],fetchCompletionHandler completionHandler:@escaping(UIBackgroundFetchResult) - >空隙)
我的问题是 为什么我们需要在每种情况下调用didReceiveRemoteNotification时都需要新的ios 10方法,我已经在iOS 10手机上进行了测试。