Description
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"); );
Activity
mudi256 commentedon Oct 24, 2019
below in my data message from firebase cloud
const payload = { data: { data_type: "direct_message", title: "Some Title", message: "Hello git", message_id: "message id from firebase database", id : Date.now().toString(), },};
var options= { priorty:"high", content_available : true }
return admin.messaging().sendToDevice(token, payload,options).then((response) => { return console.log("Successfully sent message:", response); })
iapicca commentedon Oct 24, 2019
Hi @mudi256
I see there's an open issue addressing the case you described.
Please follow up on that issue,
I'm closing the current one as duplicate.
If you disagree please write in the comments
and I will reopen it.
Thank you