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 only receiving messages in foreground aka. onResume and onLaunch not executing #1799
Comments
PS. You cant receive notifications on the iOS simulator when you have the app closed. You need to test this on a physical device. |
Even with a physical device the notifications never came through. Is Firebase messaging simply unable to send push notifications in the background or when the app is closed for iOS 13? |
Hi @dazednconfusing |
The issue you linked to has only a solution for android whereas this is for ios. Additionally, I have found that notifications are not received in the foreground when run through xcode but they are received when run with flutter |
I'm having this issue as well. |
@dazednconfusing , @acoutts Did you find a solution, I am on a similar boat? |
No solution yet.. |
Still facing the issue. Any solutions? |
+1, I receive the notification in the foreground but not in the background although I implemented accordingly to the documentation. |
I still have the same issue. Any suggestion will be appreciated |
Still waiting for any suggestions or fix |
facing the same issue -- push notification only received for onMessage but not for the other callbacks (i.e. doesnt work when app is in background / closed) |
that's it! moving to one signal |
acoutts posted a solution somewhere to disable remote debugging. That solution worked for me on a real device. Earlier it only worked with app in foreground. |
it WORKED! OMG FCM don't work on simulators or even if you try plugging your device and making profile, debug, release.... nothing will work until you send a build to Testflight. that's so bad but at least works ! |
This comment has been minimized.
This comment has been minimized.
Which solution was that? I'm currently stuck on this. |
To disable remote debugging; basically uncheck the "Connect via network" box on Device and Simulator window of XCode. This link can help. |
…eturned map (#1799) * make sure the keys are actually added to the returned map * Add testing, removed a print
Does that really work for anybody else |
No it will work if you plug in a phone and build locally for it. Simulators will not receive pushes will receive data messages. They will still get notifications sent to FCM but they come through as a data message and will have the notification data the same as a real device. The best way to test is with a physical phone. |
@acoutts by testing with a physical device do you mean to build the app on a physical device through Xcode or submit it to test flight? It is working completely fine for me on android, and on IOS I followed the steps of requesting permissions and setup but I am receiving nothing on the background/quit state, even though I build it through Xcode on a physical device |
Hey @dazednconfusing, do you mind upgrading to the latest version: |
I have the same problem, even with my physical device. |
Due to lack of response from OP combined with a number of major release version iterations and much more detailed docs regarding ios messaging setup. I'm going to close this issue and ask any that any new problems with the current version be created as a new issue. |
Describe the bug
I followed all the instructions in the ios integration instructions on the read me and I am able to receive messages from the firebase console but only when the flutter app is running in the foreground. I am testing this with an iphone 11 max simulator. I set push notifcations on in capabilities as well as background fetch, remote notifications, background processing on in the background modes capabilities.
To Reproduce
Create a widget that instantiates a new firebase message handler, asks for permission, and configures the onMessage, onResume, onLaunch methods and prints the device token.
display this widget in the main.dart file
Run a simulator with flutter run and exit the app and go to the home page
Go to your firebase messaging console and send a message to the printed device token
Expected behavior
I expect to see a notification banner with the message sent from firebase. NOTE ** If the app is open then onMessage method runs fine and a snackbar widget is displayed as desired.
Additional context
None I can think of
The text was updated successfully, but these errors were encountered: