title: Firebase Notification not coming in foreground but working for background in iOS Ionic 2 application
body: <p>I am trying to send a notification from Firebase console to my iOS device. It receives in the background. But the same notification is not received when the app is in the foreground. The same works for Android foreground as well as the background. I am using <code>onMessage().subscribe(......)</code>API and trying to show an alert when the notification comes.</p>
  
  <p>The plugin I used is <strong>cordova-plugin-firebase-messaging 1.1.4</strong>. </p>
  
  <p>In Firebase console, when I try to send the notification in the foreground, the message status sticks to Scheduled only and is never send to the device. I want to understand where I might be missing. </p>
  
  <p>The plugins I used in my application are listed below. Not sure, if any other plugin is causing this issue or there is a different issue. If anyone has fixed a similar issue or have knowledge about it, I seek your guidance. </p>
  
  <pre><code>com.darktalker.cordova.screenshot 0.1.5 "Screenshot"
  cordova-plugin-android-fingerprint-auth 1.4.4 "FingerprintAuth"
  cordova-plugin-app-version 0.1.9 "AppVersion"
  cordova-plugin-background-mode 0.7.2 "BackgroundMode"
  cordova-plugin-badge 0.8.7 "Badge"
  cordova-plugin-ble-central 1.2.2 "BLE"
  cordova-plugin-calendar 5.1.2 "Calendar"
  cordova-plugin-camera 4.0.3 "Camera"
  cordova-plugin-compat 1.2.0 "Compat"
  cordova-plugin-device 2.0.2 "Device"
  cordova-plugin-file 6.0.1 "File"
  cordova-plugin-firebase-messaging 1.1.4 "FirebaseMessagingPlugin"
  cordova-plugin-geolocation 4.0.1 "Geolocation"
  cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
  cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
  cordova-plugin-ionic-webview 2.1.4 "cordova-plugin-ionic-webview"
  cordova-plugin-local-notification 0.9.0-beta.3 "LocalNotification"
  cordova-plugin-mauron85-background-geolocation 2.3.6 "CDVBackgroundGeolocation"
  cordova-plugin-network-information 2.0.1 "Network Information"
  cordova-plugin-safariviewcontroller 1.5.4 "SafariViewController"
  cordova-plugin-splashscreen 5.0.2 "Splashscreen"
  cordova-plugin-statusbar 2.4.2 "StatusBar"
  cordova-plugin-touch-id 3.3.1 "Touch ID"
  cordova-plugin-whitelist 1.3.3 "Whitelist"
  cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
  cordova-support-android-plugin 1.0.1 "cordova-support-android-plugin"
  cordova-support-google-services 1.2.1 "cordova-support-google-services"
  cordova.plugins.diagnostic 4.0.10 "Diagnostic"
  es6-promise-plugin 4.2.2 "Promise"
  mx.ferreyra.callnumber 0.0.2 "Cordova Call Number Plugin"
  phonegap-plugin-barcodescanner 8.0.0 "BarcodeScanner"
  </code></pre>