Search code examples
androidmeteorcordova-pluginscordova-plugin-fcm

FCM push notification for android using meteor


I referred the below documents: https://github.com/raix/push and https://github.com/raix/push/blob/master/docs/ANDROID.md. In which I found that I have to add some part of code in server side of app.The code is as follows:

Push.Configure({
   apn: {
   certData: Assets.getText('apnDevCert.pem'),
   keyData: Assets.getText('apnDevKey.pem'),
   passphrase: 'xxxxxxxxx',
   production: true,
   },
   gcm: {
   apiKey: 'abc-123',
   projectNumber: 111111111111
  }});

In this code,I am not getting what should I put in place of certData,keyData,passphrase.So please explain me step by step.


Solution

  • I believe you don't need APN if your scope is only Android.

    APN stands for Apple Push Notifications. If however you need to push to Apple as well, you would need to follow a relatively lengthy process in which you would generate the Apple certificates for production and development (you need to be registered as an Apple developer). The passphrase is like an encryption key used in the generation of those certificates. As far as I remember RAIX documentation sends to a complete article about the creation of the Apple keys. That is the one I followed in the past.

    I would just delete the APN part in both server and client configurations and only keep what is relevant for Android.

    Cheers, P