title: Flutter - Firebase Cloud Messaging, Data Message is not received on iOS
body: <p>Notification handler</p>
  <pre><code>void firebaseCloudMessagingListeners() {
      _firebaseMessaging.configure(
        onMessage: (Map&lt;String, dynamic&gt; message) async {
          print('onMessage ==&gt; $message');
          messageHandler(message);
        },
        onResume: (Map&lt;String, dynamic&gt; message) async {
          print('onResume ==&gt; $message');
          messageHandler(message);
        },
        onLaunch: (Map&lt;String, dynamic&gt; message) async {
          print('onLaunch ==&gt; $message');
          messageHandler(message);
        },
        onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
      );
    }
  
    static Future&lt;dynamic&gt; myBackgroundMessageHandler(
        Map&lt;String, dynamic&gt; message) {
      print('onBackgroundMessage ==&gt; $message');
      if (message.containsKey('data')) {
        final dynamic data = message['data'];
        print('$data');
      }
  
      if (message.containsKey('notification')) {
        final dynamic notification = message['notification'];
        print('$notification');
      }
  
      return null;
    }
  </code></pre>
  <p>POST <a href="https://fcm.googleapis.com/fcm/send" rel="noreferrer">https://fcm.googleapis.com/fcm/send</a></p>
  <pre><code>{
     &quot;to&quot;: &quot;myFCMToken&quot;,
     &quot;priority&quot;: &quot;high&quot;,
     &quot;data&quot;: {
        &quot;click_action&quot;: &quot;FLUTTER_NOTIFICATION_CLICK&quot;,
        &quot;data_title&quot;: &quot;data_title&quot;,
        &quot;data_body&quot;: &quot;data_body&quot;
     },
     &quot;notification&quot;: {
        &quot;title&quot;: &quot;Good Night&quot;,
        &quot;body&quot;: &quot;Wish you have a nice dream..&quot;,
        &quot;sound&quot;: &quot;default&quot;
     }
  }
  </code></pre>
  <p>When I sent notification with payload above, notification is delivered to the system tray and when I tapped it, i had these three with following cases:</p>
  <blockquote>
  <ol>
  <li>App is in Background (closed/terminated), the &quot;data&quot; is presented and onLaunch method is called.</li>
  <li>App is in Background (minimized), the &quot;data&quot; is missing, onResume method is not called.</li>
  <li>App is in Foreground, the &quot;data&quot; is missing, onMessage method is not called.</li>
  </ol>
  </blockquote>
  <p>The question is, how to receive or handle that &quot;data&quot; with notification is also delivered to system tray?
  Any help would be appreciated.</p>