-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[firebase_messaging] iOS isn't showing notifications on background #2987
Comments
Something strange is happening with the plugin for iOS on my end as well `[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.5 19F101, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3) [✓] Xcode - develop for iOS and macOS (Xcode 11.6) [✓] Android Studio (version 4.0) [✓] VS Code (version 1.47.0) [✓] Connected device (2 available) ` Push notifications are registering on the command line but not showDialog or AlertDialog. I would think the issue related to those, but the code seems to die only on iOS platform. |
@jfrsbg Have you tried simplifying the calls from the onMessage, onResume, etc callbacks. I ran into zero errors logged, but the code did contain them. The behavior was different for iOS and Android. Also, are messages printing on the console? |
I can reproduce the issue using official example flutter doctor -v
Closing as duplicate of #2854 |
First of all, I just followed this video to configurate push notifications on android https://www.youtube.com/watch?v=9zWs0I7UpcQ. The video just follow the documentation on pub.dev, so, I just put him here to use as a reference.
I've tried many fixes here on github, there are many issues opened in the past days but none of these solved my problem. This issue will be related with many other issues but I don't know what to do anymore.
Lets talk about the problem: On Android, background notifications and foreground callbacks are working with no problems, but when I try to reproduce my code on iOS, only the "onMessage" callback is working as expected. No background messages or notifications are appearing on top of the screen.
The thing is that flutter version on the video is 1.12.13 and the version of firebase_messaging is 6.0.15 and I'm using version 6.0.16 of firebase_messaging and flutter version is 1.17.5. I just rollback the plugin version to 16.0.15 and the results are the same. I didn't try to rollback flutter version because that is not a option in the moment.
To Reproduce
follow the video or documentation and you will be ok (that means "ok" to reproduce the error)
Expected behavior
when trying to send a notification message from firebase console, with the app on background, no notification is showing on top of screen.
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.14.6 18G5033, locale en-BR)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[✓] Android Studio (version 3.5)
[✓] Connected device (1 available)
• No issues found!
The text was updated successfully, but these errors were encountered: