Firebase Cordova vs Firebase JS SDK?

Viewed 413

I'm building a mobile app based on Cordova. Quick research lead me to these repos:

  1. Firebase's official JS SDK library - https://github.com/firebase/firebase-js-sdk
  2. Firebase Cordova implementation - https://github.com/dpa99c/cordova-plugin-firebasex

There is no explanation on the Cordova repository on how it differs from the Firebase JS SDK. Since I can run JS on my Cordova app, then my biggest question is why do I need the cordova-plugin-firebasex at all? What the added value here?

2 Answers

The firebase js sdk is used only for web while the cordova-plugin-firebasex is used for android and ios apps. If you use the firebase-js-sdk then you won't be able to send notifications to the android or the ios device. Also the cordova plugin will enable you to use crashlytics which you can't use with the js sdk.

Firebase JS SDK should work on all platforms (all available features for web) as at the end of the day it is a WebView. But the plugin will allow you to use Android or IOS specific features.

Related