Description
Previously my app worked just fine (for over a year). The app I have in the app store also still works fine.
Since I updated to the newest flutter and firebase_messaging package I however have some problems on iOS (Android works fine). I now have
firebase_messaging: ^7.0.3
When I install the app and close it I don't get any notifications. When I then open the app again I get an onMessage call (so the message was received by the phone, but the notification was not shown as a notification while the app was closed), but it looks different as what I normal get:
{from: 756240466417, data: {“message“:369}, collapse_key: io.m-Path.kuleuven, click_action: FLUTTER_NOTIFICATION_CLICK, notification: {sound2: default, title: Notification from Siggy [code0]:, tag: whatever, e: 1, sound: default, body: Time for a couple of questions?, icon: myIcon}}
After that, everything works normal. I get notifications when the app is closed, and the onMessage calls I get when the app is open look like what I always had:
{gcm.message_id: 1605774095223064, data: {“message“:369}, google.c.sender.id: 756240466417, google.c.a.e: 1, click_action: FLUTTER_NOTIFICATION_CLICK, aps: {alert: {title: Notification from Siggy [code0]:, body: Time for a couple of questions?}, sound: default}}
Flutter doctor -v
[✓] Flutter (Channel stable, 1.22.4, on macOS 11.0.1 20B29 darwin-x64, locale
en-BE)
• Flutter version 1.22.4 at /Users/app/flutter
• Framework revision 1aafb3a8b9 (6 days ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/merijnmestdagh/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.9.3
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (1 available)
• Merijn’s iPhone (mobile) • 00008020-0009601E1199002E • ios • iOS 13.4.1