title: Background message handler on iOS release mode not called when app is in the background [FCM, Flutter]
body: <p>My background message handler for FCM is not being called on iOS.</p>
  <p>I have followed the steps <a href="https://firebase.flutter.dev/docs/messaging/apple-integration" rel="nofollow noreferrer">here</a> in setting up for ios FCM.</p>
  <p>I have also toggle on and check Background fetch and Remote Notifications respectively as shown</p>
  <p><a href="https://i.stack.imgur.com/B2nLK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B2nLK.png" alt="enter image description here" /></a></p>
  <p>FCM messages with notification or notification + data work fine.</p>
  <p>However, when I use data-only messages for triggering the background message handler, the handler is not triggered.</p>
  <p>Below is my code:</p>
  <pre><code>    Future&lt;void&gt; _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
        await Firebase.initializeApp();
        print('Handling a background message ${message.messageId}');
        print(message.data);
     
      }
      
      
      void main() async {
        WidgetsFlutterBinding.ensureInitialized();
        await Firebase.initializeApp();
        FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
        setupDependencies();
        runApp(MyApp());
        }
  </code></pre>
  <p>Below is the data I sent from postman to test the background handler:</p>
  <pre><code>{
      &quot;content_available&quot; : true,
      &quot;priority&quot; : &quot;high&quot;,
     &quot;data&quot; : {
          &quot;click_action&quot;: &quot;FLUTTER_NOTIFICATION_CLICK&quot;,
          &quot;x&quot;: &quot;22&quot;,
     },
      &quot;to&quot;:&quot;xxxUSER_FCM_TOKENxxx&quot;
  }
  </code></pre>
  <p>Any suggestions or ideas on how to go about this?</p>