fcm icon indicating copy to clipboard operation
fcm copied to clipboard

question: How does this library compare versus the official `@capacitor/push-notifications` plugin?

Open tafelnl opened this issue 3 years ago • 1 comments

I am confused as to what the benefit is for using this library over the official @capacitor/push-notifications plugin.

I tried to look for it in the docs/issues, and the only thing I found about it was this comment (https://github.com/capacitor-community/fcm/issues/11#issuecomment-515796247) of you (@stewones) saying

Capacitor will never send you fcm tokens, that’s why I created this plugin.

But, actually, the Capacitor plugin does support retrieving the token (maybe it wasn't at the time of your writing, but it is now): https://capacitorjs.com/docs/apis/push-notifications#token

So that leaves me wondering: what is the benefit of this plugin?

tafelnl avatar Aug 02 '22 14:08 tafelnl

The official does not support subscribing to topics (yet).

allard-potma avatar Aug 12 '22 10:08 allard-potma

@capacitor/push-notifications uses FCM on Android and APNS on iOS @capacitor-community/fcm uses FCM on both Android and iOS

The token you linked is going to be an APNS token on iOS, unless you follow this guide to integrate FCM into your iOS app, that would make it possible to get a FCM token on iOS without needing @capacitor-community/fcm.

@capacitor-community/fcm has some methods that @capacitor/push-notifications doesn't have, like the mentioned about subscribing to topics.

jcesarmobile avatar Oct 20 '22 14:10 jcesarmobile

Thanks for explaining @jcesarmobile

stewones avatar Oct 20 '22 14:10 stewones