title: Firebase to iOS APNS messages
body: <p>This is a question with a bit of news to the dev community. </p>
  
  <p>I send messages from AWS SNS to Firebase, wherefrom it is supposed to be routed to both GCM and APNs.</p>
  
  <ul>
  <li>GCM messages pass without any problem. </li>
  <li>News part: Contrary to all statements by Apple developer guides, my simulator on Mac registers on firebase, gets registration token and then receives notifications sent via Firebase. It does not display them in the notification center automatically, but I create notification display manually from the applicationReceivedRemoteMessage() function as UILocalNotification(), so now it even displays them in notification center - highly unexpected but it works.</li>
  <li><p>When I install the app on a real iPhone, the messages are not received. Not that they are not displayed - the function is never called. </p></li>
  <li><p>My .p12 keys on the Firebase are the private key of push certificates as described here: <a href="https://firebase.google.com/docs/cloud-messaging/ios/certs" rel="nofollow noreferrer">https://firebase.google.com/docs/cloud-messaging/ios/certs</a></p></li>
  </ul>
  
  <p>There are several questions on SO discussing this issue of not receiving APNs messages, but here we have an especially narrow room for error (and some good news for other developers): </p>
  
  <ul>
  <li>simulator receives messages so my code iOS code must be OK.  </li>
  <li>Android app receives messages so AWS SNS to Firebase route works.</li>
  <li>Hence the problem is isolated to the Firebase to iOS only, most probably related to either provisioning profiles / keys. </li>
  <li>I use manually created profiles</li>
  </ul>
  
  <p>Tried to export complete push certificate as .p12 and add to Firebase but it does not work as well.</p>
  
  <p>Any suggestions as to what can be wrong/worth checking? </p>