Git Product home page Git Product logo

cordova-plugin-firebase's Introduction

Build Status

cordova-plugin-firebase

This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! Android and iOS supported.

Supported Cordova Versions

  • cordova: >= 6
  • cordova-android: >= 6.4
  • cordova-ios: >= 4

Installation

Install the plugin by adding it to your project's config.xml:

<plugin name="cordova-plugin-firebase" spec="^2.0.0" />

or by running:

cordova plugin add cordova-plugin-firebase --save

Guides

Great installation and setup guide by Medium.com - https://medium.com/@felipepucinelli/how-to-add-push...

Setup

Download your Firebase configuration files, GoogleService-Info.plist for iOS and google-services.json for android, and place them in the root folder of your cordova project. Check out this firebase article for details on how to download the files.

- My Project/
    platforms/
    plugins/
    www/
    config.xml
    google-services.json       <--
    GoogleService-Info.plist   <--
    ...
IMPORTANT NOTES
  • This plugin uses a hook (after prepare) that copies the configuration files to the right place, namely platforms/ios/\<My Project\>/Resources for ios and platforms/android for android.
  • Firebase SDK requires the configuration files to be present and valid, otherwise your app will crash on boot or Firebase features won't work.

PhoneGap Build

Hooks do not work with PhoneGap Build. This means you will have to manually make sure the configuration files are included. One way to do that is to make a private fork of this plugin and replace the placeholder config files (see src/ios and src/android) with your actual ones, as well as hard coding your app id and api key in plugin.xml.

Google Play Services

Your build may fail if you are installing multiple plugins that use Google Play Services. This is caused by the plugins installing different versions of the Google Play Services library. This can be resolved by installing cordova-android-play-services-gradle-release.

If your build is still failing, you can try installing cordova-android-firebase-gradle-release. For more info, read the following comment about locking down the specific versions for play services and firebase. It is suggested to use + instead of 15.+ to ensure the correct versions are used.

Google Tag Manager

Checkout our guide for info on setting up Google Tag Manager.

Configuring Notifications

Checkout our guide for info on configuring notification icons and colors.

API

See the full API available for this plugin.

cordova-plugin-firebase's People

Contributors

aikei avatar andrewlively avatar briantq avatar c4software avatar erikdju avatar freezyexp avatar ginkgomzd avatar gvieduc avatar hardikinfodesk avatar hardikthakkar3 avatar hilljh82 avatar hirbod avatar imgos avatar jestcastro avatar jonsmart avatar juliocbcotta avatar keyz182 avatar lora-reames avatar m6246 avatar manuelsc avatar markterrill avatar noeldemartin avatar robertarnesson avatar soumak77 avatar suau avatar swindex avatar taracque avatar thomas-alrek avatar troystopera avatar vlavrynovych avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.