iOS not receiving Firebase Push Notification sent through the API

前端 未结 1 1350
名媛妹妹
名媛妹妹 2021-01-12 02:44

I\'m using Google\'s Firebase Cloud Messaging to send push-notifications to my iOS and Android applications. The push-notifications sent through the Cloud Messaging console

相关标签:
1条回答
  • 2021-01-12 03:14

    I managed to fix the problem thanks to this answer: https://stackoverflow.com/a/37550067/516338

    Basically, although NOT in the documents, you have to set the "priority" field to "high" on iOS, like this:

    {   
      "to": "cHPpZ_s14EA:APA91bG56znW...",
      "priority": "high",
      "notification" : {
        "body" : "hello!",
        "title": "afruz",
        "sound": "default"
      }
    }  
    
    0 讨论(0)
提交回复
热议问题