admin管理员组

文章数量:1221921

When i send the notification using Firebase console, my onMessage works correctly but when I send the notification using Rest API, it does not trigger at all. My problem is only for iOS. This is my payload for API.

{
    "message": {
        "token": "my-token",
        "notification": {
            "title": "New Notification",
            "body": "Hello, this is a test notification!"
        },
        "data": {
            "name": "name"
        },
        "apns": {
            "headers": {
                "apns-priority": "10"
            },
            "payload": {
                "aps": {
                    "content-available": 1
                }
            }
        }
    }
}

本文标签: firebasemessaging()onMessage() not called when notification is sent using Rest APIStack Overflow