Skip to content

IOS Data message not received while app is terminated #1307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mudi256 opened this issue Oct 24, 2019 · 2 comments
Closed

IOS Data message not received while app is terminated #1307

mudi256 opened this issue Oct 24, 2019 · 2 comments
Labels
type: bug Something isn't working

Comments

@mudi256
Copy link

mudi256 commented Oct 24, 2019

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"); );

@mudi256
Copy link
Author

mudi256 commented 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 iapicca added type: bug Something isn't working blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Oct 24, 2019
@iapicca
Copy link

iapicca commented 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

@iapicca iapicca closed this as completed Oct 24, 2019
@firebase firebase locked and limited conversation to collaborators Aug 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants