diff --git a/README.md b/README.md index 73b0d7426..75db4defa 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This plugin brings push notifications, analytics, event tracking, crash reportin - [Difference from the fork repository](#difference-from-the-fork-repository) - * [Confirm your Cordova environment versions](#confirm-your-cordova-environment-versions) +- [Confirm your Cordova environment versions](#confirm-your-cordova-environment-versions) - [Major Releases](#major-releases) * [v5.x](#v5x) + [Supported Cordova Platforms](#supported-cordova-platforms) @@ -17,19 +17,17 @@ This plugin brings push notifications, analytics, event tracking, crash reportin + [Supported Cordova Platforms](#supported-cordova-platforms-1) * [v3.x](#v3x) + [Supported Cordova Platforms](#supported-cordova-platforms-2) -- [Installation](#installation) +- [Installation & Setup](#installation--setup) * [Uninstall the original firebase plugin](#uninstall-the-original-firebase-plugin) - * [For `cordova-cli >= 9.x.x` && (`cordava-ios >= 5.0.1` || `cordava-android >= 8.x.x`)](#for-cordova-cli--9xx--cordava-ios--501--cordava-android--8xx) - * [For `cordova-cli = 4.5.0` || `cordova-android >= 8.x.x`)](#for-cordova-cli--450--cordova-android--8xx) - * [For `cordova-cli <= 7.1.0` && (`cordava-ios <= 4.5.5` || `cordova-android <= 7.1.4`)](#for-cordova-cli--710--cordava-ios--455--cordova-android--714) + * [Install this plugin](#install-this-plugin) * [AndroidX](#androidx) -- [Guides](#guides) + * [Guides](#guides) * [Setup](#setup) - * [IMPORTANT NOTES](#important-notes) + * [Important Notes](#important-notes) * [PhoneGap Build](#phonegap-build) * [Google Play Services](#google-play-services) - [Docs](#docs) - * [API](#api) + * [API Docs](#api-docs) * [Google Tag Manager](#google-tag-manager) * [Configuring Notifications](#configuring-notifications) @@ -45,7 +43,7 @@ application. To see a full list of changes done after we started maintaining thi [Releases](https://github.com/wizpanda/cordova-plugin-firebase-lib/releases) or read the [CHANGELOG.md](https://github.com/wizpanda/cordova-plugin-firebase-lib/blob/master/CHANGELOG.md#v300) -### Confirm your Cordova environment versions +## Confirm your Cordova environment versions Before you continue installing this plugin, please confirm your Cordova environment versions. You can either get everything by just running: @@ -101,7 +99,7 @@ which was released before Jun 17, 2019. - cordova-android: `>= 7.0.0` (Might work on `cordova-android 6.x` versions) - cordova-ios: `>= 4.5.5` (Might work on old `cordova-ios` versions) -## Installation +## Installation & Setup ### Uninstall the original firebase plugin @@ -112,15 +110,17 @@ rm -rf platforms/android cordova plugin remove cordova-plugin-firebase ``` -### For `cordova-cli >= 9.x.x` && (`cordava-ios >= 5.0.1` || `cordava-android >= 8.x.x`) +### Install this plugin + +**For `cordova-cli >= 9.x.x` && (`cordava-ios >= 5.0.1` || `cordava-android >= 8.x.x`)** Use the latest major releases just by running: ```bash -cordova plugin add cordova-plugin-firebase-lib --save +cordova plugin add cordova-plugin-firebase-lib ``` -### For `cordova-cli <= 8.1.1` && (`cordava-ios >= 4.5.0` || `cordova-android >= 8.x.x`) +**For `cordova-cli <= 8.1.1` && (`cordava-ios <= 4.5.5` || `cordova-android >= 8.x.x`)** Use the v4.x release by running: @@ -128,7 +128,7 @@ Use the v4.x release by running: cordova plugin add cordova-plugin-firebase-lib@4.1.0 --save ``` -### For `cordova-cli <= 7.1.0` && (`cordava-ios <= 4.5.5` || `cordova-android <= 7.1.4`) +**For `cordova-cli <= 7.1.0` && (`cordava-ios <= 4.5.5` || `cordova-android <= 7.1.4`)** Run the following in your terminal: @@ -150,7 +150,7 @@ cordova plugin add cordova-plugin-androidx cordova plugin add cordova-plugin-androidx-adapter ``` -## Guides +### Guides 1. Great installation and setup guide [https://medium.com/@felipepucinelli/how-to-add-push...](https://medium.com/@felipepucinelli/how-to-add-push-notifications-in-your-cordova-application-using-firebase-69fac067e821) @@ -158,10 +158,10 @@ cordova plugin add cordova-plugin-androidx-adapter Download your Firebase configuration files: -* `GoogleService-Info.plist` for iOS and -* `google-services.json` for Android +- `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) +And place them in the root folder of your Cordova app. Check out this [firebase article](https://support.google.com/firebase/answer/7015592) for details on how to download the files. ```bash @@ -175,22 +175,30 @@ for details on how to download the files. ... ``` -###### IMPORTANT NOTES +### Important Notes + - This plugin uses a hook (after prepare) that copies the configuration files to the right place, namely `platforms/ios/my-cordova-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`. + +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](https://github.com/dpa99c/cordova-android-play-services-gradle-release). +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](https://github.com/dpa99c/cordova-android-play-services-gradle-release). -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. It is suggested to use `+` instead of `15.+` to ensure the correct versions are used. +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. It is suggested to use `+` instead of `15.+` to ensure the correct versions are used. ## Docs -### API +### API Docs See the full [API](docs/API.md) docs available for this plugin.