Firebase FCM silent push notifications for iOS

后端 未结 4 1769
花落未央
花落未央 2020-12-03 05:31

I have a problem with silent notifications on iOS.

When my application is in background, I don\'t receive silent notification sent by FCM. But if I try to send direc

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 05:59

    Remove "notification" key value pair and add "content_available": true

    It will look like this

    { 
        "to" : "...",
        "priority": "high",
        "content_available": true,
        "data" : {
          ....
        }
    }
    

    This should make it a silent APNS and you need to handle with corresponding APNS delegate method.

    You will need to handle this through delegates Refer this firebase documentation for details: https://firebase.google.com/docs/cloud-messaging/concept-options

提交回复
热议问题