Skip to content

Push payload different on iOS #456

@tricki

Description

@tricki

I'm sending a simple push notification using the Firebase Web API:

{
  "to": "topics/testing",
  "notification: {
    "title": "",
    "body": "This is a test"
  },
  "data": {
    "id" => "123"
  }
}

On android I receive this payload in onNotificationOpen (when app is in foreground):

{
  "id": 123,
  "tap": false,
  "body": "This is a test",
  "title": ""
}

But on iOS it looks like this:

{
  "aps": {
    "alert": {
      "body": "This is a test",
      "title": ""
    },
  },
  "gcm.message_id": "0:xxxxxxxxxxxxxxxxxxxxxxxxxx`,
  "id": "53",
  "tap": false
}

As you can see in Android I get the title and body as children of notification whereas on iOS they are children of aps.alert.

Is this the indended behavior? I seem to remember that the format was the same the last time I used this plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions