Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit a3eadd1

Browse files
bump
1 parent 248ae0b commit a3eadd1

File tree

4 files changed

+15
-27
lines changed

4 files changed

+15
-27
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ install:
2121
- tns usage-reporting disable
2222
- tns error-reporting disable
2323
- cd demo
24+
- npm run build.plugin
2425
- npm i
2526

2627
script:
@@ -44,14 +45,14 @@ matrix:
4445
before_install:
4546
- gem install cocoapods
4647
- pod repo update
47-
script: npm i && npm run build-ios-bundle
48+
script: npm run build-ios-bundle
4849
- language: android
4950
os: linux
5051
env:
5152
- Webpack="Android"
5253
jdk: oraclejdk8
5354
before_install: nvm install 6.10.3
54-
script: npm i ../src && npm run build-android-bundle
55+
script: npm run build-android-bundle
5556
- stage: "Build"
5657
env:
5758
- BuildAndroid="25"
@@ -73,4 +74,4 @@ matrix:
7374
- gem install cocoapods
7475
- pod repo update
7576
script:
76-
- cd tns build ios
77+
- tns build ios

README.md

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,53 +41,43 @@ Open your Firebase project at the Google console and click 'Add app' to add an i
4141
* Android: `google-services.json` which you'll add to your NativeScript project at `app/App_Resources/Android/google-services.json`
4242

4343
## Installation
44-
If you rather watch a video explaining the steps then check out this step-by-step guide - you'll also learn how to
44+
If you rather watch a (slightly outdated) video explaining the steps then check out this step-by-step guide - you'll also learn how to
4545
add iOS and Android support to the Firebase console and how to integrate anonymous authentication:
4646
[![YouTube demo](docs/images/yt-thumb-setup.png)](https://youtu.be/IextEpoIzwE "YouTube demo")
4747

48-
4948
From the command prompt go to your app's root folder and execute:
5049

5150
```bash
5251
tns plugin add nativescript-plugin-firebase
5352
```
5453

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-
6454
This will launch an install script which will guide you through installing additional components.
6555
Check the doc links above to see what's what. You can always change your choices later.
6656

6757
### Config
6858
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.
7060

7161
You can reconfigure the plugin by going to the `node_modules/nativescript-plugin-firebase` and running `npm run config`.
7262

7363
You can also change the configuration by deleting the `firebase.nativescript.json` and reinstalling the plugin.
7464

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.
7767

7868
#### 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`:
8171

8272
```
83-
// /app/App_Resources/Android/app.gradle
84-
8573
project.ext {
8674
googlePlayServicesVersion = "+"
8775
}
8876
```
8977

9078
## Usage
79+
80+
### Demo app
9181
If you want a quickstart, clone the repo, `cd src`, and `npm run demo.ios` or `npm run demo.android`.
9282

9383
### Start-up wiring
@@ -112,7 +102,7 @@ firebase.init({
112102

113103
#### TypeScript
114104
```js
115-
import firebase = require("nativescript-plugin-firebase");
105+
const firebase = require("nativescript-plugin-firebase");
116106

117107
firebase.init({
118108
// Optionally pass in properties for database, authentication and cloud messaging,
@@ -247,6 +237,3 @@ android {
247237
```
248238

249239
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).

demo/app/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
import * as application from 'tns-core-modules/application';
33

44
// added this here so we can do some wiring
5-
const firebase = require("nativescript-plugin-firebase");
5+
require("nativescript-plugin-firebase");
66

77
application.start({ moduleName: "main-page" });

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-plugin-firebase",
3-
"version": "4.2.0-dev",
3+
"version": "4.2.0",
44
"description": "Fire. Base. Firebase!",
55
"main": "firebase",
66
"typings": "index.d.ts",

0 commit comments

Comments
 (0)