Skip to content

Commit 7acbb81

Browse files
committed
feat: alpha.0
1 parent 840b26a commit 7acbb81

File tree

55 files changed

+16740
-15153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+16740
-15153
lines changed

apps/demo/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@nativescript/firebase-functions": "file:../../packages/firebase-functions"
2424
},
2525
"devDependencies": {
26-
"@nativescript/android": "8.1.0",
27-
"@nativescript/ios": "8.0.0"
26+
"@nativescript/android": "8.2.0-alpha.2",
27+
"@nativescript/ios": "8.1.0"
2828
}
2929
}

apps/demo/src/app.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Application } from '@nativescript/core';
1+
import { Application, Utils } from '@nativescript/core';
22
import { firebase } from '@nativescript/firebase-core';
33
import '@nativescript/firebase-admob';
44
import '@nativescript/firebase-analytics';
@@ -51,5 +51,4 @@ messaging
5151
.catch((e) => {
5252
console.error('requestPermission', e);
5353
});
54-
5554
Application.run({ moduleName: 'app-root' });

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"nativescript-vue-template-compiler": "~2.9.0",
3737
"ng-packagr": "^12.0.0",
3838
"rxjs": "~6.6.0",
39+
"stacktrace-js": "~2.0.2",
3940
"typescript": "~4.3.0",
4041
"zone.js": "~0.11.1"
4142
},

packages/firebase-admob/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nativescript/firebase-admob",
3-
"version": "1.0.0",
4-
"description": "Add a plugin description",
3+
"version": "1.0.0-alpha.0",
4+
"description": "NativeScript Firebase - Admob",
55
"main": "index",
66
"typings": "index.d.ts",
77
"nativescript": {
@@ -12,7 +12,7 @@
1212
},
1313
"repository": {
1414
"type": "git",
15-
"url": "https://github.com/NativeScript/plugins.git"
15+
"url": "https://github.com/NativeScript/firebase.git"
1616
},
1717
"keywords": [
1818
"NativeScript",
@@ -26,10 +26,10 @@
2626
"email": "oss@nativescript.org"
2727
},
2828
"bugs": {
29-
"url": "https://github.com/NativeScript/plugins/issues"
29+
"url": "https://github.com/NativeScript/firebase/issues"
3030
},
3131
"license": "Apache-2.0",
32-
"homepage": "https://github.com/NativeScript/plugins",
32+
"homepage": "https://github.com/NativeScript/firebase",
3333
"readmeFilename": "README.md",
3434
"bootstrapper": "@nativescript/plugin-seed"
3535
}

packages/firebase-analytics/README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,29 @@
44
ns plugin add @nativescript/firebase-analytics
55
```
66

7+
## Google Analytics for Firebase
8+
9+
## What does it do?
10+
11+
Google Analytics is a free app measurement solution that provides insight on app usage and user engagement. Analytics reports help you understand clearly how your users behave, which enables you to make informed decisions regarding app marketing and performance optimizations.
12+
13+
14+
[![image](https://img.youtube.com/vi/8iZpH7O6zXo/hqdefault.jpg)](https://www.youtube.com/watch?v=8iZpH7O6zXo)
15+
16+
17+
718
## Usage
819

9-
// TODO
20+
```ts
21+
import { firebase } from '@nativescript/firebase-core';
22+
import '@nativescript/firebase-analytics';
1023

24+
firebase().analytics()
25+
.logEvent('custom_name', {
26+
thing: 1
27+
});
28+
29+
```
1130
## License
1231

1332
Apache License Version 2.0

packages/firebase-analytics/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nativescript/firebase-analytics",
3-
"version": "1.0.0",
4-
"description": "Add a plugin description",
3+
"version": "1.0.0-alpha.0",
4+
"description": "NativeScript Firebase - Analytics",
55
"main": "index",
66
"typings": "index.d.ts",
77
"nativescript": {
@@ -12,7 +12,7 @@
1212
},
1313
"repository": {
1414
"type": "git",
15-
"url": "https://github.com/NativeScript/plugins.git"
15+
"url": "https://github.com/NativeScript/firebase.git"
1616
},
1717
"keywords": [
1818
"NativeScript",
@@ -26,10 +26,10 @@
2626
"email": "oss@nativescript.org"
2727
},
2828
"bugs": {
29-
"url": "https://github.com/NativeScript/plugins/issues"
29+
"url": "https://github.com/NativeScript/firebase/issues"
3030
},
3131
"license": "Apache-2.0",
32-
"homepage": "https://github.com/NativeScript/plugins",
32+
"homepage": "https://github.com/NativeScript/firebase",
3333
"readmeFilename": "README.md",
3434
"bootstrapper": "@nativescript/plugin-seed"
3535
}

packages/firebase-app-check/README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,56 @@
44
ns plugin add @nativescript/firebase-app-check
55
```
66

7+
8+
**Note**: iOS
9+
10+
App Check requires you set the minimum iOS Deployment version in ios/Podfile to 11.0 or greater.
11+
12+
13+
### What does it do
14+
15+
App Check works alongside other Firebase services to help protect your backend resources from abuse, such as billing fraud or phishing. With App Check, devices running your app will use an app or device attestation provider that attests to one or both of the following:
16+
17+
Requests originate from your authentic app
18+
Requests originate from an authentic, untampered device
19+
This attestation is attached to every request your app makes to your Firebase backend resources.
20+
21+
[![image](https://img.youtube.com/vi/Fjj4fmr2t04/hqdefault.jpg)](https://www.youtube.com/watch?v=Fjj4fmr2t04)
22+
23+
This App Check module has built-in support for using the following services as attestation providers:
24+
25+
DeviceCheck on iOS
26+
SafetyNet on Android
27+
App Check currently works with the following Firebase products:
28+
29+
Realtime Database
30+
Cloud Storage
31+
Cloud Functions (callable functions)
32+
The [official Firebase App Check documentation](https://firebase.google.com/docs/app-check) has more information, including about the iOS AppAttest provider, and testing/ CI integration, it is worth a read.
33+
734
## Usage
835

9-
// TODO
36+
### Activate
37+
38+
39+
On iOS if you include the App Check package, it is activated by default. The only configuration possible is the token auto refresh. When you call activate, the provider (DeviceCheck by default) stays the same but the token auto refresh setting will be changed based on the argument provided.
40+
41+
On Android, App Check is not activated until you call the activate method. The provider is not configurable here either but if your app is "debuggable", then the Debug app check provider will be installed, otherwise the SafetyNet provider will be installed.
42+
43+
You must call activate prior to calling any firebase back-end services for App Check to function.
44+
45+
46+
47+
### Automatic Data Collection
48+
49+
App Check has an "tokenAutoRefreshEnabled" setting. This may cause App Check to attempt a remote App Check token fetch prior to user consent. In certain scenarios, like those that exist in GDPR-compliant apps running for the first time, this may be unwanted.
50+
51+
If unset, the "tokenAutoRefreshEnabled" setting will defer to the app's "automatic data collection" setting, which may be set in the Info.plist or AndroidManifest.xml
52+
53+
54+
### Using App Check tokens for non-firebase services
55+
56+
The [official documentation](https://firebase.google.com/docs/app-check/web/custom-resource) shows how to use getToken to access the current App Check token and then verify it in external services.
1057

1158
## License
1259

packages/firebase-app-check/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nativescript/firebase-app-check",
3-
"version": "1.0.0",
4-
"description": "Add a plugin description",
3+
"version": "1.0.0-alpha.0",
4+
"description": "NativeScript Firebase - App Check",
55
"main": "index",
66
"typings": "index.d.ts",
77
"nativescript": {
@@ -12,7 +12,7 @@
1212
},
1313
"repository": {
1414
"type": "git",
15-
"url": "https://github.com/NativeScript/plugins.git"
15+
"url": "https://github.com/NativeScript/firebase.git"
1616
},
1717
"keywords": [
1818
"NativeScript",
@@ -26,10 +26,10 @@
2626
"email": "oss@nativescript.org"
2727
},
2828
"bugs": {
29-
"url": "https://github.com/NativeScript/plugins/issues"
29+
"url": "https://github.com/NativeScript/firebase/issues"
3030
},
3131
"license": "Apache-2.0",
32-
"homepage": "https://github.com/NativeScript/plugins",
32+
"homepage": "https://github.com/NativeScript/firebase",
3333
"readmeFilename": "README.md",
3434
"bootstrapper": "@nativescript/plugin-seed"
3535
}

0 commit comments

Comments
 (0)