Skip to content

Commit

Permalink
Updating README.
Browse files Browse the repository at this point in the history
  • Loading branch information
sagrawal31 committed Jun 25, 2019
1 parent dcfd859 commit ebf3191
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,25 @@ This plugin brings push notifications, analytics, event tracking, crash reportin
<!-- toc -->

- [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)
* [v4.x](#v4x)
+ [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)

Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand All @@ -112,23 +110,25 @@ 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:

```bash
cordova plugin add [email protected] --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:

Expand All @@ -150,18 +150,18 @@ 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)

### Setup

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
Expand All @@ -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.

Expand Down

0 comments on commit ebf3191

Please sign in to comment.