简体   繁体   中英

Application delegate received call to -application:didReceiveRemoteNotification:fetchCompletionHandler: but the completion handler was never called

Iam using pusher.com to send push notification from our server to our flutter apps, on android is normaly work but on ios is the problem receive Application delegate received call to -application:didReceiveRemoteNotification:fetchCompletionHandler: but the completion handler was never called

but from print response my apps get the result from pusher.com 在此处输入图像描述

please help if anybody have similiar problem like me, thank you

You have to end your function with a completionHandler , otherwise the function will misbehave

func application(
    _ application: UIApplication,
    didReceiveRemoteNotification userInfo: [AnyHashable : Any],
    fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
) {


//

completionHandler(.newData) // or whatever you want

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM