0

This is a question with a bit of news to the dev community.

I send messages from AWS SNS to Firebase, wherefrom it is supposed to be routed to both GCM and APNs.

  • GCM messages pass without any problem.
  • 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.
  • 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.

  • My .p12 keys on the Firebase are the private key of push certificates as described here: https://firebase.google.com/docs/cloud-messaging/ios/certs

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):

  • simulator receives messages so my code iOS code must be OK.
  • Android app receives messages so AWS SNS to Firebase route works.
  • Hence the problem is isolated to the Firebase to iOS only, most probably related to either provisioning profiles / keys.
  • I use manually created profiles

Tried to export complete push certificate as .p12 and add to Firebase but it does not work as well.

Any suggestions as to what can be wrong/worth checking?

AL.
  • 36,815
  • 10
  • 142
  • 281
VitalyR
  • 185
  • 1
  • 3
  • 11
  • Maybe with the payload? Can you post a sample? – AL. Jan 19 '17 at 03:17
  • The payload is ok since it is received on the Android platform. There are "default" , "GCM" and "APNS" parts of the payload and Firebase indeed delivers only the GCM part everywhere which is wrong, but it works. – VitalyR Jan 20 '17 at 03:28

1 Answers1

0

Turns out Firebase instructions referenced in the question are incorrect - instead of exporting the private key of push certificate as .p12, export the complete certificate. Upload to Firebase and it will work.

VitalyR
  • 185
  • 1
  • 3
  • 11