|
1 | | -# Cordova Firebase Plugin |
| 1 | +# We are moving & merging ... |
2 | 2 |
|
3 | | -[](https://badge.fury.io/js/cordova-plugin-firebase-lib) |
| 3 | +Since the breaking change released by Google Firebase on Jun 17th, 2019, [we](https://www.wizpanda.com) have been maintaining this |
| 4 | +repository. From the same time, another guy [Dave Alden](https://github.com/dpa99c) from somewhere in the world 😄 is also maintaining |
| 5 | +his fork https://github.com/dpa99c/cordova-plugin-firebasex. |
4 | 6 |
|
5 | | -This plugin brings push notifications, analytics, event tracking, crash reporting and more from Google Firebase to your Cordova project! |
| 7 | +Intention of both of us are same i.e. **to give back to the open-source community** and help developers of Cordova & Ionic frameworks so |
| 8 | +that they can use the Google Firebase in their applications without a hitch. So both the repositories were being updated regularly and |
| 9 | +new releases were being made. |
6 | 10 |
|
7 | | -## Table of Contents |
| 11 | +This good though by both [Wiz Panda](https://www.wizpanda.com) & Dave resulted in developers of Cordova & Ionic getting confused & |
| 12 | +diverted to two different repositories which will become a mess in the future. To prevent this, we discussed this in a |
| 13 | +[thread](https://github.com/dpa99c/cordova-plugin-firebasex/issues/47) raised by [hugoblanc](https://github.com/hugoblanc) and we all |
| 14 | +together decided to archive this repository and divert the developers to Dave's fork. |
8 | 15 |
|
9 | | -<!-- toc --> |
| 16 | +Dave has been quite active on his fork and he is doing a great job updating & improving the native codebase and documentations so: |
10 | 17 |
|
11 | | -- [Difference from the fork repository](#difference-from-the-fork-repository) |
12 | | -- [Prerequisites](#prerequisites) |
13 | | - * [For Android App](#for-android-app) |
14 | | - * [For iOS App](#for-ios-app) |
15 | | -- [Confirm your Cordova environment versions](#confirm-your-cordova-environment-versions) |
16 | | -- [Major Releases and Supported Cordova Platforms](#major-releases-and-supported-cordova-platforms) |
17 | | - * [v5.x](#v5x) |
18 | | - * [v4.x](#v4x) |
19 | | - * [v3.x](#v3x) |
20 | | -- [Installation & Setup](#installation--setup) |
21 | | - * [Uninstall the original firebase plugin](#uninstall-the-original-firebase-plugin) |
22 | | - * [Install this plugin](#install-this-plugin) |
23 | | - * [AndroidX](#androidx) |
24 | | - * [CocoaPods](#cocoapods) |
25 | | - * [Guides](#guides) |
26 | | - * [Setup](#setup) |
27 | | - * [Important Notes](#important-notes) |
28 | | - * [PhoneGap Build](#phonegap-build) |
29 | | - * [Google Play Services](#google-play-services) |
30 | | -- [Docs](#docs) |
31 | | - * [API Docs](#api-docs) |
32 | | - * [Google Tag Manager](#google-tag-manager) |
33 | | - * [Configuring Notifications](#configuring-notifications) |
| 18 | +## Requesting all the developers to start using [dpa99c/cordova-plugin-firebasex](https://github.com/dpa99c/cordova-plugin-firebasex) instead of this repository. |
34 | 19 |
|
35 | | -<!-- tocstop --> |
| 20 | +One can still use the last version of this plugin i.e. `v5.1.1` and checkout the code at commit/tag |
| 21 | +https://github.com/wizpanda/cordova-plugin-firebase-lib/tree/v5.1.1 but please note: |
36 | 22 |
|
37 | | -## Difference from the fork repository |
| 23 | +### No further updates, improvements will be made to this repository. No PR will be accepted. |
38 | 24 |
|
39 | | -Maintained by [Wiz Panda](https://www.wizpanda.com/). |
| 25 | +If this plugin helped you in any way in your development, you can thank us by doing any or all of the following: |
40 | 26 |
|
41 | | -The [author](https://github.com/arnesson) did a great job on the plugin. But seems not to be maintaining the changes. So we at **Wiz Panda** |
42 | | -thought to maintain the repository with the latest changes & fixes so the others can take benefit of the Firebase in their cordova |
43 | | -application. To see a full list of changes done after we started maintaining this fork, please see the |
44 | | -[Releases](https://github.com/wizpanda/cordova-plugin-firebase-lib/releases) or read the |
45 | | -[CHANGELOG.md](https://github.com/wizpanda/cordova-plugin-firebase-lib/blob/master/CHANGELOG.md#v300) |
| 27 | +1. Follow us on [LinkedIn](https://www.linkedin.com/company/wizpanda) |
| 28 | +2. Like our [Facebook page](https://www.facebook.com/wizpandatech/) |
| 29 | +3. Send us a [message](https://www.wizpanda.com/#contactUs) |
46 | 30 |
|
47 | | -## Prerequisites |
| 31 | +Or |
48 | 32 |
|
49 | | -### For Android App |
| 33 | +[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FKF4YUN7R92U6&item_name=Cordova+Firebase+Plugin¤cy_code=INR&source=url) |
50 | 34 |
|
51 | | -1. Android Studio |
52 | | -2. Check more here at https://firebase.google.com/docs/android/setup#prerequisites |
| 35 | +> We look forward to seeing you in our new spaces! |
53 | 36 |
|
54 | | -### For iOS App |
55 | | - |
56 | | -1. Xcode 10.1 or later. |
57 | | -2. CocoaPods 1.4.0 or later. |
58 | | -3. Check more here at https://firebase.google.com/docs/ios/setup#prerequisites |
59 | | - |
60 | | -## Confirm your Cordova environment versions |
61 | | - |
62 | | -Before you continue installing this plugin, please confirm your Cordova environment versions. You can either get everything by just |
63 | | -running: |
64 | | - |
65 | | -```bash |
66 | | -cordova info |
67 | | -``` |
68 | | - |
69 | | -Or grab it manually: |
70 | | - |
71 | | -1. For `cordova-cli` & `cordova-lib`, run `cordova -v`. It should be something like: `9.0.0 ([email protected])` |
72 | | -2. For `cordova-android`, check the version in your `config.xml`. It should be like: `<engine name="android" spec="7.1.4" />` |
73 | | -3. For `cordova-ios`, check the version in same `config.xml`. It should be like: `<engine name="ios" spec="4.5.5" />` |
74 | | - |
75 | | -## Major Releases and Supported Cordova Platforms |
76 | | - |
77 | | -In the last week from Jun 17, 2019 to Jun 25, 2019, we released three major versions of this plugin so that developers across the globe, |
78 | | -who are using different versions of `cordova-lib`, `cordova-android` & `cordova-ios` can use different version of this plugin without |
79 | | -needing to upgrade these 3 dependencies immediately. So here are the three major releases of this plugin: |
80 | | - |
81 | | -### v5.x |
82 | | - |
83 | | -1. CocoaPods is used to manage Firebase dependencies for iOS. We don't need `cordova-plugin-cocoapod-support` because `cordova-cli 9.x` |
84 | | -has better support of handling CocoaPods dependencies. |
85 | | - |
86 | | -- cordova-cli: `>= 9.0.0` |
87 | | -- cordova-lib: `>= 9.0.1` (Will be used automatically by `cordova-cli`) |
88 | | -- cordova-android: `>= 8.0.0` |
89 | | -- cordova-ios: `>= 5.0.1` |
90 | | - |
91 | | -### v4.x |
92 | | - |
93 | | -1. Minimum `v8.0.0` of `cordova-android` is now required. View [#13](https://github.com/wizpanda/cordova-plugin-firebase-lib/pull/13) for details. |
94 | | -2. Using latest versions of Firebase Android dependencies. |
95 | | - |
96 | | -- cordova: `>= 8.0.0` |
97 | | -- cordova-lib: `>= 8.0.0` (Will be used automatically by `cordova-cli`) |
98 | | -- cordova-android: `>= 8.0.0` |
99 | | -- cordova-ios: `>= 4.5.5` |
100 | | - |
101 | | -### v3.x |
102 | | - |
103 | | -1. Using last [released](https://firebase.google.com/support/release-notes/android#update_-_may_31_2019) Firebase Android dependencies |
104 | | -which was released before Jun 17, 2019. |
105 | | - |
106 | | -- cordova: `>= 7.0.0` |
107 | | -- cordova-android: `>= 7.0.0` (Might work on `cordova-android 6.x` versions) |
108 | | -- cordova-ios: `>= 4.5.5` (Might work on old `cordova-ios` versions) |
109 | | - |
110 | | -## Installation & Setup |
111 | | - |
112 | | -### Uninstall the original firebase plugin |
113 | | - |
114 | | -If you are using the [original](https://github.com/arnesson/cordova-plugin-firebase) firebase plugin, remove it first: |
115 | | - |
116 | | -```bash |
117 | | -rm -rf platforms/android |
118 | | -cordova plugin remove cordova-plugin-firebase |
119 | | -``` |
120 | | - |
121 | | -### Install this plugin |
122 | | - |
123 | | -| # | Plugin version | Cordova CLI | Cordova Android | Cordova iOS | CocoaPods | |
124 | | -| --- | -------------- | ----------- | --------------- | ----------- | --------- | |
125 | | -| 1 | Latest | >= 9.0.0 | >= 8.0.0 | >= 5.0.1 | >= 1.4.0 | |
126 | | -| 2 | 4.1.0 | <= 8.1.1 | >= 8.0.0 | <= 4.5.5 | N/A | |
127 | | -| 3 | 3.3.0 | <= 7.1.0 | <= 7.1.4 | <= 4.5.5 | N/A | |
128 | | - |
129 | | -```bash |
130 | | -#1 - Use the latest major release |
131 | | -cordova plugin add cordova-plugin-firebase-lib |
132 | | - |
133 | | -#2 - Use the v4.x release |
134 | | -cordova plugin add [email protected] --save |
135 | | - |
136 | | -#3 - Use the v3.x release |
137 | | -cordova plugin add [email protected] --save |
138 | | -``` |
139 | | - |
140 | | -### AndroidX |
141 | | - |
142 | | -Because of the major breaking release by Google Firebase on [Jun 17, 2019](https://developers.google.com/android/guides/releases#june_17_2019) |
143 | | -this plugin has been migrated to use [AndroidX](https://developer.android.com/jetpack/androidx/migrate). AndroidX is a major improvement |
144 | | -to the original Android [Support Library](https://developer.android.com/topic/libraries/support-library/index). |
145 | | - |
146 | | -If any of your Cordova app includes any plugin which is still using legacy Android Support Library, then installing this plugin might |
147 | | -break your build. For that install the following plugins: |
148 | | - |
149 | | -```bash |
150 | | -cordova plugin add cordova-plugin-androidx |
151 | | -cordova plugin add cordova-plugin-androidx-adapter |
152 | | -``` |
153 | | - |
154 | | -### CocoaPods |
155 | | - |
156 | | -This plugin uses [CocoaPods](https://cocoapods.org/) to manage the iOS Firebase dependencies. So please note the following two points: |
157 | | - |
158 | | -1. If you are building your app using Xcode, please open `platform/ios/my-cordova-project.xcworkspace` instead of |
159 | | -`platform/ios/my-cordova-project.xcodeproj` so that the Xcode can load both Cordova app & the Pods. |
160 | | -2. Your repo needs to be up to date. To keep it up to date, run `pod repo update` anywhere in your terminal. |
161 | | - |
162 | | -### Guides |
163 | | - |
164 | | -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) |
165 | | - |
166 | | -### Setup |
167 | | - |
168 | | -Download your Firebase configuration files: |
169 | | - |
170 | | -- `GoogleService-Info.plist` for iOS and |
171 | | -- `google-services.json` for Android |
172 | | - |
173 | | -And place them in the root folder of your Cordova app. Check out this [firebase article](https://support.google.com/firebase/answer/7015592) |
174 | | -for details on how to download the files. |
175 | | - |
176 | | -```bash |
177 | | -- my-cordova-project/ |
178 | | - platforms/ |
179 | | - plugins/ |
180 | | - www/ |
181 | | - config.xml |
182 | | - google-services.json <-- |
183 | | - GoogleService-Info.plist <-- |
184 | | - ... |
185 | | -``` |
186 | | - |
187 | | -### Important Notes |
188 | | - |
189 | | -- This plugin uses a hook (`after_prepare`) that copies the configuration files to the right place, namely |
190 | | -`platforms/ios/my-cordova-project/Resources` for iOS and `platforms/android` for Android. |
191 | | -- Firebase SDK requires the configuration files to be present and valid, otherwise your app will crash on boot or build. |
192 | | - |
193 | | -### PhoneGap Build |
194 | | - |
195 | | -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 |
196 | | - that is to make a private fork of this plugin and replace the placeholder config files (see `src/ios` and `src/android`) with your |
197 | | - actual ones, as well as hard coding your app id and api key in `plugin.xml`. |
198 | | - |
199 | | -### Google Play Services |
200 | | -Your build may fail if you are installing multiple plugins that use Google Play Services. This is caused by the plugins installing |
201 | | -different versions of the Google Play Services library. This can be resolved by installing |
202 | | -[cordova-android-play-services-gradle-release](https://github.com/dpa99c/cordova-android-play-services-gradle-release). |
203 | | - |
204 | | -If your build is still failing, you can try installing [cordova-android-firebase-gradle-release](https://github.com/dpa99c/cordova-android-firebase-gradle-release). |
205 | | -For more info, read the following [comment](https://github.com/dpa99c/cordova-plugin-request-location-accuracy/issues/50#issuecomment-390025013) |
206 | | -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. |
207 | | - |
208 | | -## Docs |
209 | | - |
210 | | -### API Docs |
211 | | - |
212 | | -See the full [API](docs/API.md) docs available for this plugin. |
213 | | - |
214 | | -### Google Tag Manager |
215 | | - |
216 | | -Checkout our [guide](docs/GOOGLE_TAG_MANAGER.md) for info on setting up Google Tag Manager. |
217 | | - |
218 | | -### Configuring Notifications |
219 | | - |
220 | | -Checkout our [guide](docs/NOTIFICATIONS.md) for info on configuring notification icons and colors. |
| 37 | + |
0 commit comments