Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does FCM Messaging for IOS works with Data Messages (app in background)? #1066

Open
flutter2k20 opened this issue Oct 18, 2020 · 0 comments
Open

Comments

@flutter2k20
Copy link

flutter2k20 commented Oct 18, 2020

Hi There,

I have an IOS app setup to receive FCM push messages. I can receive "notification" messages fine - always shows a notification with the title/body etc.

Now I am trying to send data messages to the app and expecting the

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

to be called with the data received. And it never gets called even the app is in foreground. My message/payload looks like

{
  "to": "DEVICE_TOKEN",
  "content_available": true,
  "apns-priority": 5,
  "data": {
    "somekey": "somevalue"
  }
}

I have tried with method swizzling flag enabled or disabled and it does not makes any difference.

My question is, does firebase SDK for IOS support data messages at all?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant