fcm onMessage works on simulator but does not work in physical device

Viewed 748

I am a web developer trying to build a simple hybrid webview app with push notification. So I used flutter and firebase-cloud-messaging. The android side works fine in both emulator and on a physical android phone.

But for ios I have a problem. The onMessage callback works in the simulator and generates a AlertDialog. But when I test it on a physical iphone, it doesnt work. Nothing pops up. The other callbacks do work(onLaunch, onResume). Another weird part, is that as soon as the test app is installed on the physical device, the terminal loses connection to the device. So I cannot even see the error logs.

1 Answers

For me, It depends on version of
implementation 'com.google.firebase:firebase-messaging:20.1.0' on build.gradle

Related