How to setup FCM (Firebase) API Key push for both iOS and Android

Hi all,

About module parse-server-push-adapter, How to config FCM API Key for push iOS?
Currently, we separate 2 keys APNS and FCM for 2 devices?

Parse-server-push-adapter uses FCM to send push to Android devices and APNS (and not FCM) to send to iOS devices. You can take a look in this guide on how to setup (http://docs.parseplatform.org/parse-server/guide/#push-notifications-quick-start) but it would be something like this:

var server = new ParseServer({
  databaseURI: '...',
  cloud: '...',
  appId: '...',
  masterKey: '...',
  push: {
    android: {
      apiKey: '...'
    },
    ios: {
      pfx: '/file/path/to/XXX.p12',
      passphrase: '', // optional password to your p12/PFX
      bundleId: '',
      production: false
    }
  }
});
1 Like

@davimacedo Thanks for your reply.

Already used this config, but now I have one problem that only use FCM (firebase) push for both devices (iOS and Android) not separate APNs key and FCM key.

I try used another solution, I wrote new push adapter use firebase-admin module. It worked.

Nice! Is it open source? Share the link with the community. It can be helpful for other people.

1 Like

@davimacedo
Sorry not yet. I will make it. But where can i share it?

Thanks.

I think you can turn your adapter repository public and then send a PR to http://parseplatform.org/ including the link to your repository in Community Highlights or Other Helpful Repos section.

1 Like

I will update more about unit-test for my module and share repo later.

1 Like