You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
From the command prompt go to your app's root folder and execute:
50
49
51
50
```bash
52
51
tns plugin add nativescript-plugin-firebase
53
52
```
54
53
55
-
**IMPORTANT** If this is your first installation of this plugin, the CLI should prompt you with a few questions.
56
-
However, due to a bug in the CLI (which will be fixed by [this PR](https://github.com/NativeScript/nativescript-cli/pull/2944)) no prompt may appear,
57
-
in which case you should now do:
58
-
59
-
```bash
60
-
cd node_modules/nativescript-plugin-firebase
61
-
npm run setup
62
-
```
63
-
64
54
This will launch an install script which will guide you through installing additional components.
65
55
Check the doc links above to see what's what. You can always change your choices later.
66
56
67
57
### Config
68
58
If you choose to save your config during the installation, the supported options may be saved in the `firebase.nativescript.json` at the root of your app.
69
-
This is to ensure your app may roundtrip source control and installation on CI won't run the questionary during install.
59
+
This is to ensure your app may roundtrip source control and installation on CI won't prompt for user input during installation.
70
60
71
61
You can reconfigure the plugin by going to the `node_modules/nativescript-plugin-firebase` and running `npm run config`.
72
62
73
63
You can also change the configuration by deleting the `firebase.nativescript.json` and reinstalling the plugin.
74
64
75
-
### iOS
76
-
The Firebase iOS SDK is installed via Cocoapods, so run `pod repo update` to ensure you have the latest spec.
65
+
### iOS (Cocoapods)
66
+
The Firebase iOS SDK is installed via Cocoapods, so run `pod repo update`from the command prompt (in any folder) to ensure you have the latest spec.
77
67
78
68
#### Google Play Services Version
79
-
The plugin will default to version 10.0+ of the Android `play-services-base` SDK.
80
-
If you need to change the version (to for instance the latest version), you can add a project ext property `googlePlayServicesVersion`like so:
69
+
The plugin will default to [this version](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/src/platforms/android/include.gradle#L27) of the Android `play-services-base` SDK.
70
+
If you need to change the version (to for instance the latest version), you can add a project ext property `googlePlayServicesVersion`to `app/App_Resources/Android/app.gradle`:
81
71
82
72
```
83
-
// /app/App_Resources/Android/app.gradle
84
-
85
73
project.ext {
86
74
googlePlayServicesVersion = "+"
87
75
}
88
76
```
89
77
90
78
## Usage
79
+
80
+
### Demo app
91
81
If you want a quickstart, clone the repo, `cd src`, and `npm run demo.ios` or `npm run demo.android`.
// Optionally pass in properties for database, authentication and cloud messaging,
@@ -247,6 +237,3 @@ android {
247
237
```
248
238
249
239
Where `"11.2.+"` is best set to the same value as the `firebase-core` dependency version in [this file](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/platforms/android/include.gradle).
250
-
251
-
## Credits
252
-
The starting point for this plugin was [this great Gist](https://gist.github.com/jbristowe/c89a7bcae7fc9a035ee7) by [John Bristowe](https://github.com/jbristowe).
0 commit comments