最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

firebase - messaging().onMessage() not called when notification is sent using Rest API - Stack Overflow

programmeradmin0浏览0评论

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
                }
            }
        }
    }
}
发布评论

评论列表(0)

  1. 暂无评论