You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iOS Push Notification not Received in Notification tray (when app is Not running or in Background) Received when app is launched.
Followed all the steps to integrate firebase_messaging 6.0.16 into our Flutter Application.
PFB Flutter Code
@override
void initState() {
super.initState();
//for android
mainpref = SPManager();
// With this, we will be able to check if the permission is granted or not
// when returning to the application
WidgetsBinding.instance.addObserver(this);
// With this, we will be able to check if the permission is granted or not
// when returning to the application
if (Platform.isIOS) {
iOSPermission();
}
configLocalNotification();
fcm.getToken().then((token) {
FLog.debug(
className: this.runtimeType.toString(), text: 'token : ' + token);
mainpref.setNotificationToken(token);
});
fcm.configure(
onMessage: (Map<String, dynamic> message) async {
FLog.info(text: "onMessage: $message");
showNotification(message);
},
onLaunch: (Map<String, dynamic> message) async {
FLog.info(text: "onLaunch: $message");
var tag =
Platform.isIOS ? message['screen'] : message['data']['screen'];
var data = Platform.isIOS ? message : message['data'];
Utility().isLaunchedViaNotification = true;
callPage(tag, data);
},
onResume: (Map<String, dynamic> message) async {
FLog.info(text: "onResume: $message");
var tag =
Platform.isIOS ? message['screen'] : message['data']['screen'];
var data = Platform.isIOS ? message : message['data'];
callPage(tag, data);
},
);
}
void iOSPermission() {
//Needed by iOS only
fcm.requestNotificationPermissions(const IosNotificationSettings(
sound: true, badge: true, alert: true, provisional: false));
fcm.onIosSettingsRegistered.listen((IosNotificationSettings settings) {
mainpref.setalert(settings.alert);
mainpref.setsound(settings.sound);
mainpref.setbadge(settings.badge);
FLog.info(text: "Settings registered: $settings");
});
}
Expected behavior
Notification should be received in notification tray when app is not running or app is in background.
Flutter doctor
[flutter] flutter doctor -v
[✓] Flutter (Channel beta, 1.19.0-4.3.pre, on Mac OS X 10.15.4 19E287, locale en-IN)
• Flutter version 1.19.0-4.3.pre at /Users/iosdev/flutter sdk/flutter
• Framework revision 8fe7655ed2 (12 days ago), 2020-07-01 14:31:18 -0700
• Engine revision 9a28c3bcf4
• Dart version 2.9.0 (build 2.9.0-14.1.beta)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/iosdev/Library/Android/sdk
• Platform android-29, build-tools 28.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_212-release-1586-b4-5784211)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.2.1, Build version 11B53
• CocoaPods version 1.9.0.beta.2
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] VS Code (version 1.47.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.12.2
[✓] Connected device (2 available)
• Air 2 • ***************************************************** • ios • iOS 13.5.1
• iPhone 11 Pro • 9E3AE2F3-278E-4B2F-A466-4BF78F9B335E • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-2 (simulator)
! Doctor found issues in 1 category.
exit code 0
Please help me in this issue.
Thanks
The text was updated successfully, but these errors were encountered:
kalpesh
changed the title
[<FIREBASE_PRODUCT>] <TITLE> iOS Push Notification not Received in Notification tray
[<FIREBASE_PRODUCT>] <iOS Push Notification not Received in Notification tray>
Jul 13, 2020
kalpesh
changed the title
[<FIREBASE_PRODUCT>] <iOS Push Notification not Received in Notification tray>
[firebase_messaging] iOS Push Notification not Received in Notification tray
Jul 13, 2020
I'm facing de same issue by now, Android works fine but iOS doesn't. There are various workarrounds of December and January on github with this same issue but nothing is working for me. I've configured everything that the docs are saying but I'm only receiving notifications with the app in foreground
iOS Push Notification not Received in Notification tray (when app is Not running or in Background) Received when app is launched.
Followed all the steps to integrate firebase_messaging 6.0.16 into our Flutter Application.
PFB Flutter Code
iOS Code
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Notification should be received in notification tray when app is not running or app is in background.
Flutter doctor
Please help me in this issue.
Thanks
The text was updated successfully, but these errors were encountered: