title: Cordova Firebase Plugin - Not showing notifications in notification bar on iOS
body: <p>I'm using this plugin with <strong>cordova: cordova-plugin-firebase 0.1.18 "Google Firebase Plugin"</strong> its working fine on android,also on ios i got token using method</p>
  
  <pre><code>window.FirebasePlugin.getToken
  </code></pre>
  
  <p>but notification not coming in notification bar weather its in foreground or background call back of notification never come in using method    </p>
  
  <pre><code>window.FirebasePlugin.onNotificationOpen
  </code></pre>
  
  <p>on server side i am posting like this,</p>
  
  <pre><code>def sendNotfMessage(def registrationIds,def body,def title){
              def data  = [:]
              data['body']=body
              data['title']=title
              data['icon']="myicon"
              data['sound']="mySound"
              def postJson = [:]
              postJson['priority'] = "high"
              postJson['notification'] = data
              postJson['registration_ids']=registrationIds
              return sendFcmNotf(postJson)
          }
  
  
  def sendFcmNotf(def postJson){
  
      HttpTransport transport = new NetHttpTransport()
      HttpRequest request = transport.createRequestFactory().buildPostRequest(new GenericUrl("https://fcm.googleapis.com/fcm/send"), new JsonHttpContent(new JacksonFactory(), postJson));
      HttpHeaders reqHeaders = new HttpHeaders()
      reqHeaders.setAuthorization("key=${grailsApplication.config.android.fcm.api.key}")
      reqHeaders.setAccept("application/json")
      reqHeaders.setContentType("application/json")
  
      request.setHeaders(reqHeaders)
  
      request.setUnsuccessfulResponseHandler(new HttpBackOffUnsuccessfulResponseHandler(new ExponentialBackOff.Builder()
              .setInitialIntervalMillis(500)
              .setMaxElapsedTimeMillis(900000)
              .setMaxIntervalMillis(6000)
              .setMultiplier(1.5)
              .setRandomizationFactor(0.5)
              .build()
              ))
  
      try {
  
  
          HttpResponse response = request.execute();
  
          InputStream is = response.getContent()
          BufferedReader br = new BufferedReader(new InputStreamReader(is))
  
          StringBuilder sb = new StringBuilder();
  
          String line = null;
          try {
              while ((line = br.readLine()) != null) {
                  sb.append(line);
              }
          } catch (IOException e) {
              e.printStackTrace();
          } finally {
              try {
                  is.close();
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          ObjectMapper mapper = new ObjectMapper()
          Map&lt;String, Object&gt; responseMap = mapper.readValue(sb.toString(), new TypeReference&lt;Map&lt;String, Object&gt;&gt;(){})
  
          // Process response JSON per https://firebase.google.com/docs/cloud-messaging/server#response
          if(responseMap &amp;&amp; (responseMap['failure'] != 0 || responseMap['canonical_ids'] != 0)){
              if(responseMap['message_id'] &amp;&amp; responseMap['registration_id']){
  
                  log.info "New push token, setting to ${responseMap['registration_id']}"
  
                  // TODO Notify backend that token has changed, i.e. update
  
              }
  
          }else{
  
              def results = responseMap['results']
  
              if(results){
  
                  results.each{
  
                      if(it['error']){
  
                          if(it['error'] == "NotRegistered"){
  
                              log.info 'NotRegistered, updating AppToken to null'
  
                              // TODO Notify backend this token is no longer valid, i.e. delete
  
                          }
                      }
  
                  }
  
              }
  
          }
  
  
          return responseMap
  
      }catch(HttpResponseException e){
  
          log.error "Error: ${e.toString()}"
  
          return (['SC' : e.getStatusCode(), 'M' : e.getStatusMessage() ])
  
      }
  }
  }
  </code></pre>