Search code examples
iosflutterfirebasefirebase-cloud-messagingapple-push-notifications

On iOS FCM is not working without notification tag inside body


FCM is used in our application, there are certain events where our server will send FCM request to registered token to the application. There are two types of scenarios, in one the server requests FCM with notification and data in body and the other scenario is that it only send the request to FCM with data. We have our app on PlayStore as well as AppStore[last updated on Jan, 2022]. It is working as expected over there, till date. Now we had to update firebase_messaging plugin, or else build is failing. After this we had to do few changes in the flutter code. FCM now, works as expected on android, on iOS only we are getting those notifications who has the notification key in the body, but without the notification key in the body FCM is not working on iOS[but works on android].


Solution

  • Adding "content_available": true in the payload while calling fcm solved the issue