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

Commit d632074

Browse files
#101 Post Install Concept
- trivial cleanup - doc adjustments - version bump
1 parent 277f7b8 commit d632074

File tree

8 files changed

+46
-33
lines changed

8 files changed

+46
-33
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
<img src="docs/images/firebase-logo.png" width="116px" height="32px" alt="Firebase"/>
22

3+
## 3.5.1 (2016, August 12)
4+
5+
[Full changelog](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/compare/3.5.0...3.5.1)
6+
7+
### SDK versions
8+
If version numbers changed clean your platform folders to avoid build errors.
9+
10+
- iOS: 3.3.x
11+
- Android: 9.4.0
12+
13+
### New
14+
- [#101](#101) Post Install script, to help making configuration easier!
15+
16+
17+
318
## 3.5.0 (2016, August 9)
419

520
[Full changelog](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/compare/3.4.4...3.5.0)

README.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ For readability the supported features have been moved to their own README's:
1414
* [Storage](docs/STORAGE.md)
1515
* [Crash Reporting](docs/CRASHREPORTING.md)
1616

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+
1720
## Prerequisites
1821
Head on over to [https://console.firebase.google.com/](https://console.firebase.google.com/) and sign up for a free account.
1922
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:
3538
```
3639
tns plugin add nativescript-plugin-firebase
3740
```
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+
3843

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:
4045

4146
```
4247
tns install typescript
@@ -51,28 +56,21 @@ Then open `references.d.ts` in the root of your project and add this line to get
5156
### Android
5257
Install packages 'Google Play Services' and 'Google Repository' in your [Android SDK Manager](http://stackoverflow.com/a/37310513)
5358

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-
6759
#### Open `platforms/android/build.gradle`
60+
We're trying to automate these steps, but for now:
61+
6862
- Near the top there's a dependencies section, add `classpath "com.google.gms:google-services:3.0.0"` so it becomes something like:
6963
```
7064
dependencies {
7165
classpath "com.android.tools.build:gradle:1.5.0"
7266
classpath "com.google.gms:google-services:3.0.0"
7367
}
7468
```
75-
- Add the very bottom of the same file add `apply plugin: "com.google.gms.google-services"`
69+
70+
- Add the very bottom of the same file add
71+
```
72+
apply plugin: "com.google.gms.google-services"
73+
```
7674

7775
## Usage
7876

docs/AUTHENTICATION.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Use this login type to authenticate against firebase using a token generated by
182182

183183
### Facebook login
184184

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

187187
Then add the following lines to your code and check for setup instructions for your platform below.
188188

@@ -203,11 +203,11 @@ Then add the following lines to your code and check for setup instructions for y
203203
For a complete list of the available scope permissions, visit Facebook's documentation: https://developers.facebook.com/docs/facebook-login/permissions.
204204

205205
#### 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.
207207

208208
#### Android
209209

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`
211211
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:
212212

213213
```xml
@@ -252,7 +252,7 @@ Then add the following lines to your code and check for setup instructions for y
252252
```
253253

254254
#### 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.
256256

257257
Make sure the URL Scheme for `REVERSED_CLIENT_ID` is in `app/App_Resources/iOS/Info.plist`:
258258

@@ -274,7 +274,7 @@ Then add the following lines to your code and check for setup instructions for y
274274

275275
#### Android
276276

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`
278278
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.
279279

280280
### logout

docs/MESSAGING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Version 3.3.0 of this plugin added FCM support (which is the successor of GCM).
66
Although using push messages in your Firebase app is really easy setting it up is not. Traditionally, especially for iOS.
77

88
### Android
9-
Uncomment `firebase-messaging` in [include.gradle](../platforms/android/include.gradle)
9+
If you didn't choose this feature during installation you can uncomment `firebase-messaging` in [include.gradle](../platforms/android/include.gradle)
1010

1111
### iOS
12-
Uncomment `Firebase/Messaging` in [Podfile](../platforms/ios/Podfile)
12+
If you didn't choose this feature during installation you can uncomment `Firebase/Messaging` in [Podfile](../platforms/ios/Podfile)
1313

1414
#### Receiving remote notifications in the background
1515
Open `app/App_Resources/iOS/Info.plist` and add this to the bottom:

docs/REMOTECONFIG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ This feature lets you configure parameters in your Firebase instance like these:
66

77
<img src="images/remote-config.png" width="500px" height="482px" alt="Remote Config"/>
88

9-
To enable support for Remote Config you need to manually adjust
9+
If you didn't choose this feature during installation you can manually uncomment
10+
the relevant lines to add the SDK's to your app in
1011
[Podfile](../platforms/ios/Podfile) and [include.gradle](../platforms/android/include.gradle).
1112

12-
Just uncomment the relevant lines (one for each platform) to add the SDK's to your app.
13-
1413
## Functions
1514

1615
### getRemoteConfig

docs/STORAGE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Since plugin version 3.4.0 you can use Firebase _Storage_ features.
55

66
_Storage_ lets you upload and download files to/from Google Cloud Storage which is connected to your Firebase instance.
77

8-
To enable support for Remote Config you need to manually adjust
8+
If you didn't choose this feature during installation you can manually uncomment
9+
the relevant lines to add the SDK's to your app in
910
[Podfile](../platforms/ios/Podfile) and [include.gradle](../platforms/android/include.gradle).
1011

1112
Just uncomment the relevant lines (one for each platform) to add the SDK's to your app.

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": "3.5.0",
3+
"version": "3.5.1",
44
"description" : "Fire. Base. Firebase!",
55
"main" : "firebase.js",
66
"nativescript": {

scripts/postinstall.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var usingiOS = false, usingAndroid = false;
88
var directories = {
99
ios: './platforms/ios',
1010
android: './platforms/android'
11-
}
11+
};
1212

1313
console.log('NativeScript Firebase Plugin Installation');
1414
prompt.start();
@@ -21,7 +21,7 @@ function askiOSPrompt() {
2121
prompt.get({
2222
name: 'using_ios',
2323
description: 'Are you using iOS (y/n)',
24-
default: 'y',
24+
default: 'y'
2525
}, function (err, result) {
2626
if (err) {
2727
return console.log(err);
@@ -40,7 +40,7 @@ function askAndroidPrompt() {
4040
prompt.get({
4141
name: 'using_android',
4242
description: 'Are you using Android (y/n)',
43-
default: 'y',
43+
default: 'y'
4444
}, function (err, result) {
4545
if (err) {
4646
return console.log(err);
@@ -55,13 +55,13 @@ function askAndroidPrompt() {
5555
}
5656

5757
/**
58-
* Prompt the user through the configurable firebase add-on services
58+
* Prompt the user through the configurable Firebase add-on services
5959
*/
6060
function promptQuestions() {
6161
prompt.get([{
6262
name: 'remote_config',
6363
description: 'Are you using Firebase RemoteConfig (y/n)',
64-
default: 'n',
64+
default: 'n'
6565
}, {
6666
name: 'messaging',
6767
description: 'Are you using Firebase Messaging (y/n)',
@@ -191,7 +191,7 @@ function writeGradleFile(result) {
191191
* Determines if the answer validates as selected
192192
*
193193
* @param {any} value The user input for a prompt
194-
* @returns {true} The answer is yes, {false} The answer is no
194+
* @returns {boolean} The answer is yes, {false} The answer is no
195195
*/
196196
function isSelected(value) {
197197
return (value && value.toLowerCase() === 'y')

0 commit comments

Comments
 (0)