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

Activity

mudi256

mudi256 commented on Oct 24, 2019

@mudi256
Author

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

added
type: bugSomething isn't working
blocked: customer-responseWaiting for customer response, e.g. more information was requested.
and removed
blocked: customer-responseWaiting for customer response, e.g. more information was requested.
on Oct 24, 2019
iapicca

iapicca commented on Oct 24, 2019

@iapicca

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

locked and limited conversation to collaborators on Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @mudi256@iapicca

        Issue actions

          IOS Data message not received while app is terminated · Issue #1307 · firebase/flutterfire