diff --git a/README.md b/README.md index 2b7de596d..2b243b1d5 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,28 @@ To help ensure this plugin is kept updated, new features are added and bugfixes + + +**Table of Contents** + +- [Supported Cordova Versions](#supported-cordova-versions) +- [Migrating from cordova-plugin-firebase](#migrating-from-cordova-plugin-firebase) +- [Installation](#installation) + - [Specifying dependent library versions](#specifying-dependent-library-versions) + - [AndroidX](#androidx) + - [iOS minimum version](#ios-minimum-version) + - [Cocoapods](#cocoapods) +- [Guides](#guides) +- [Setup](#setup) +- [IMPORTANT NOTES](#important-notes) + - [PhoneGap Build](#phonegap-build) + - [Google Play Services](#google-play-services) + - [Google Tag Manager](#google-tag-manager) +- [Configuring Notifications](#configuring-notifications) +- [API](#api) + + + ## Supported Cordova Versions - cordova: `>= 8` - cordova-android: `>= 8` @@ -30,7 +52,7 @@ If you already have [cordova-plugin-firebase](https://github.com/arnesson/cordov ## Installation Install the plugin by adding it to your project's config.xml: ``` - + ``` or by running: ``` @@ -45,12 +67,12 @@ By default this plugin pins specific versions of these in [its `plugin.xml`](htt These defaults can be overridden at plugin installation time by specifying plugin variables as command-line arguments, for example: - cordova plugin add cordova-plugin-firebasex --variable ANDROID_FIREBASE_CORE_VERSION=1.2.3 + cordova plugin add cordova-plugin-firebasex --variable ANDROID_FIREBASE_CORE_VERSION=17.0.0 Or you can specify them as plugin variables in your `config.xml`, for example: - - + + The following plugin variables are use to specify the follow Gradle dependency versions on Android: @@ -93,7 +115,7 @@ For example, to explicitly specify all the component versions at plugin install --variable IOS_FABRIC_VERSION=1.9.0 \ --variable IOS_CRASHLYTICS_VERSION=3.12.0 -## AndroidX +### AndroidX This plugin has been migrated to use [AndroidX (Jetpack)](https://developer.android.com/jetpack/androidx/migrate) which is the successor to the [Android Support Library](https://developer.android.com/topic/libraries/support-library/index). This is implemented by adding a dependency on [cordova-plugin-androidx](https://github.com/dpa99c/cordova-plugin-androidx) which enables AndroidX in the Android platform of a Cordova project. @@ -102,10 +124,22 @@ This is because the [major release of the Firebase and Play Services libraries o Therefore if your project includes any plugins which are dependent on the legacy Android Support Library, you should add [cordova-plugin-androidx-adapter](https://github.com/dpa99c/cordova-plugin-androidx-adapter) to your project. This plugin will dynamically migrate any plugin code from the Android Support Library to AndroidX equivalents. -### Guides +### iOS minimum version +This plugin sets a default minimum iOS version in the Pod file (see `` in `plugin.xml`) which can be overriden using a plugin variable of the same name, e.g.: + + cordova plugin add cordova-plugin-firebasex --variable IOS_MIN_VERSION=10.0 + +### Cocoapods +This plugin depends on [cordova-plugin-cocoapod-supportx](https://github.com/dpa99c/cordova-plugin-cocoapods-support) which adds Cordova support for the [CocoaPods dependency manager]( https://cocoapods.org/) in order to satify the iOS Firebase SDK library dependencies. + +Therefore please make sure you have Cocopods installed in your iOS build environemnt - setup instructions can be found [here](https://cocoapods.org/). +Also make sure your local Cocoapods repo is up-to-date by running `pod repo update`. + + +## Guides Great installation and setup guide by Medium.com - [https://medium.com/@felipepucinelli/how-to-add-push...](https://medium.com/@felipepucinelli/how-to-add-push-notifications-in-your-cordova-application-using-firebase-69fac067e821) -### Setup +## 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](https://support.google.com/firebase/answer/7015592) for details on how to download the files. ``` @@ -119,7 +153,7 @@ Download your Firebase configuration files, GoogleService-Info.plist for iOS and ... ``` -###### IMPORTANT NOTES +## IMPORTANT NOTES - This plugin uses a hook (after prepare) that copies the configuration files to the right place, namely `platforms/ios/\/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. @@ -131,7 +165,7 @@ Your build may fail if you are installing multiple plugins that use Google Play If your build is still failing, you can try installing [cordova-android-firebase-gradle-release](https://github.com/dpa99c/cordova-android-firebase-gradle-release). For more info, read the following [comment](https://github.com/dpa99c/cordova-plugin-request-location-accuracy/issues/50#issuecomment-390025013) about locking down the specific versions for play services and firebase. -## Google Tag Manager +### Google Tag Manager Checkout our [guide](docs/GOOGLE_TAG_MANAGER.md) for info on setting up Google Tag Manager. @@ -142,3 +176,4 @@ Checkout our [guide](docs/NOTIFICATIONS.md) for info on configuring notification ## API See the full [API](docs/API.md) available for this plugin. + diff --git a/plugin.xml b/plugin.xml index 44c6c6b45..2a0bbf622 100644 --- a/plugin.xml +++ b/plugin.xml @@ -102,7 +102,8 @@ - + +