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.
Copy file name to clipboardExpand all lines: README.md
+13-15Lines changed: 13 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,9 @@ For readability the supported features have been moved to their own README's:
14
14
*[Storage](docs/STORAGE.md)
15
15
*[Crash Reporting](docs/CRASHREPORTING.md)
16
16
17
+
## NativeScript version
18
+
Please update to at least tns 2.1.0 to make plugin installation a little easier (otherwise you'll need to manually add an `applicationId` to `app/App_Resources/Android/app.gradle`).
19
+
17
20
## Prerequisites
18
21
Head on over to [https://console.firebase.google.com/](https://console.firebase.google.com/) and sign up for a free account.
19
22
Your first 'Firebase' will be automatically created and made available via an URL like `https://n-plugin-test.firebaseio.com`.
@@ -35,8 +38,10 @@ From the command prompt go to your app's root folder and execute:
35
38
```
36
39
tns plugin add nativescript-plugin-firebase
37
40
```
41
+
_This will guide you through installing additional components. Check the doc links above to see what's what. You can always change your choices later._
42
+
38
43
39
-
And do yourself a favor by adding TypeScript support to your nativeScript app:
44
+
Do yourself a favor by adding TypeScript support to your nativeScript app:
40
45
41
46
```
42
47
tns install typescript
@@ -51,28 +56,21 @@ Then open `references.d.ts` in the root of your project and add this line to get
51
56
### Android
52
57
Install packages 'Google Play Services' and 'Google Repository' in your [Android SDK Manager](http://stackoverflow.com/a/37310513)
53
58
54
-
#### Open `app/App_Resources/Android/app.gradle`
55
-
- If there's no `applicationId` yet please add it to the `defaultConfig` node so it becomes:
56
-
57
-
```
58
-
android {
59
-
...
60
-
defaultConfig {
61
-
applicationId = "your.package.name"
62
-
...
63
-
}
64
-
}
65
-
```
66
-
67
59
#### Open `platforms/android/build.gradle`
60
+
We're trying to automate these steps, but for now:
61
+
68
62
- Near the top there's a dependencies section, add `classpath "com.google.gms:google-services:3.0.0"` so it becomes something like:
69
63
```
70
64
dependencies {
71
65
classpath "com.android.tools.build:gradle:1.5.0"
72
66
classpath "com.google.gms:google-services:3.0.0"
73
67
}
74
68
```
75
-
- Add the very bottom of the same file add `apply plugin: "com.google.gms.google-services"`
Copy file name to clipboardExpand all lines: docs/AUTHENTICATION.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -182,7 +182,7 @@ Use this login type to authenticate against firebase using a token generated by
182
182
183
183
### Facebook login
184
184
185
-
First, enable Facebook login in your firebase instance and add the App-ID and App-Secret.
185
+
First, enable Facebook login in your Firebase instance and add the App-ID and App-Secret.
186
186
187
187
Then add the following lines to your code and check for setup instructions for your platform below.
188
188
@@ -203,11 +203,11 @@ Then add the following lines to your code and check for setup instructions for y
203
203
For a complete list of the available scope permissions, visit Facebook's documentation: https://developers.facebook.com/docs/facebook-login/permissions.
204
204
205
205
#### iOS
206
-
If you want to use it for iOS open the `Podfile` in the plugin's `platforms/ios` folder and uncomment the Facebook line (you can't miss it).
206
+
If you didn't choose this feature during installation you can open the `Podfile` in the plugin's `platforms/ios` folder and uncomment the Facebook line.
207
207
208
208
#### Android
209
209
210
-
1.Uncomment the facebook SDK in `node_modules\nativescript-plugin-firebase\platforms\android\include.gradle`
210
+
1.If you didn't choose this feature during installation you can uncomment the facebook SDK in `node_modules\nativescript-plugin-firebase\platforms\android\include.gradle`
211
211
2. Add `<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>` to the `manifest/application tag` in `app\App_Resources\Android\AndroidManifest.xml`, so it becomes similar to this:
212
212
213
213
```xml
@@ -252,7 +252,7 @@ Then add the following lines to your code and check for setup instructions for y
252
252
```
253
253
254
254
#### iOS
255
-
If you want to use it for iOS open the `Podfile` in the plugin's `platforms/ios` folder and uncomment the `GoogleSignIn` line.
255
+
If you didn't choose this feature during installation you can open the `Podfile` in the plugin's `platforms/ios` folder and uncomment the `GoogleSignIn` line.
256
256
257
257
Make sure the URL Scheme for `REVERSED_CLIENT_ID` is in `app/App_Resources/iOS/Info.plist`:
258
258
@@ -274,7 +274,7 @@ Then add the following lines to your code and check for setup instructions for y
274
274
275
275
#### Android
276
276
277
-
1.Uncomment`google-services-auth` in `node_modules\nativescript-plugin-firebase\platforms\android\include.gradle`
277
+
1.If you didn't choose this feature during installation you can uncomment`google-services-auth` in `node_modules\nativescript-plugin-firebase\platforms\android\include.gradle`
278
278
2. Google Sign-In requires an SHA1 fingerprint: see [Authenticating Your Client for details](https://developers.google.com/android/guides/client-auth). If you don't do this you will see the account selection popup, but you won't be able to actually sign in.
0 commit comments