0

I have been doing to integrate Firebase Push Notification.(Silent messaging) I can receive data message when app is in foreground state. But I can not receive any messaging when app is background and closed state. I want to receive and handle messages when receiver is in closed state. If I can receive not handled messages when I open app from closed state then it would be ok. But Just now I can receive only app is in foreground state. If I close app and send messages. And then open app then does not receive any messaging. For a few months ago, I confirmed that messages were receiving when I open app from closed state, but not now. I am trying to fix it during a few days. But still does not find any solution. How can I fix it?

I used data messaging , not push notification And used Swift 3.

Thank you.

KENdi
  • 7,576
  • 2
  • 16
  • 31
  • Which delegate method you are receiving data? – akhiljayaram Dec 11 '17 at 17:30
  • func applicationReceivedRemoteMessage(_ remoteMessage: FIRMessagingRemoteMessage) – wangqianming Dec 11 '17 at 17:40
  • func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) – wangqianming Dec 11 '17 at 17:41
  • func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) – wangqianming Dec 11 '17 at 17:42
  • Kindly check your payload structure , whether you have set the content-available = true priority = high – akhiljayaram Dec 11 '17 at 17:54
  • yes. now in foreground i can receive data message. – wangqianming Dec 11 '17 at 18:04
  • if i close app, and send messages on other phone, and i open receiver app, i can not know about not yet handled messages. but in foreground, i can receive and handle all messages. – wangqianming Dec 11 '17 at 18:05

0 Answers0