Skip to content

IOS Data message not received while app is terminated #1307

Closed
@mudi256

Description

@mudi256

I'm using firebase_messaging 5.1.6 woking perfect on android,
the issue is only on ios when app is terminated data message not received even in myBackgroundMessageHandler, when app is in background message received in onResumed
my device is iphone8 version 13.1.3. Push Notifications and Background Modes enabled. Below is my code snippet,

final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();

_firebaseMessaging.requestNotificationPermissions(IosNotificationSettings(sound: true, badge: true, alert: true));

_firebaseMessaging.onIosSettingsRegistered.listen((IosNotificationSettings settings){ });

_firebaseMessaging.configure( onMessage: (Map<String, dynamic> message) async { print("onMessage:$message") },

onBackgroundMessage: myBackgroundMessageHandler,

onLaunch: (Map<String, dynamic> message) async { print("onLaunch: $message"); },
onResume: (Map<String, dynamic> message) async { print("onResume: $message"); );

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions