diff --git a/.gitignore b/.gitignore index 4c83da03..05b95710 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,8 @@ src/**/*.d.ts src/platforms/ios_lib/TNSMLKitCamera/TNSMLKitCamera.xcodeproj/project.xcworkspace src/platforms/ios_lib/TNSMLKitCamera/TNSMLKitCamera.xcodeproj/xcuserdata src/platforms/ios/Podfile -src/platforms/ios/build.xcconfig src/platforms/android/include.gradle +src/platforms/android/mlkithelpersrc/**/*.class !src/firebase.d.ts !src/index.d.ts !src/references.d.ts @@ -34,6 +34,7 @@ demo/firebasefunctions/functions/lib !demo-push/karma.conf.js demo-push/*.d.ts demo-ng/*.d.ts +!demo-vue/app/main.js !demo/references.d.ts !demo-push/references.d.ts !demo-ng/references.d.ts diff --git a/.travis.yml b/.travis.yml index 948bf5fa..12f650cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ branches: only: - master + matrix: include: - stage: "Lint" @@ -8,39 +9,28 @@ matrix: os: linux node_js: "8" script: "npm run ci.tslint" - - stage: "Webpack" - os: osx - env: - - Webpack="iOS" - osx_image: xcode10.0 - language: node_js - node_js: "8" - jdk: oraclejdk8 - before_install: - - gem install cocoapods - - pod repo update - script: travis_wait travis_retry tns build ios --bundle - - language: android + - stage: "WebPack" + language: android os: linux env: - - Webpack="Android" + - WebPack="Android" jdk: oraclejdk8 - before_install: nvm install 8.11.4 + before_install: nvm install stable script: travis_wait travis_retry tns build android --bundle - stage: "Build" env: - - BuildAndroid="26" + - BuildAndroid="28" language: android os: linux jdk: oraclejdk8 - before_install: nvm install 8.11.4 + before_install: nvm install stable script: - travis_wait travis_retry tns build android - os: osx env: - - BuildiOS="12.0" - - Xcode="10.0" - osx_image: xcode10.0 + - BuildiOS="12" + - Xcode="10.2" + osx_image: "xcode10.2" language: node_js node_js: "8" jdk: oraclejdk8 @@ -57,18 +47,19 @@ android: - build-tools-28.0.3 - android-28 - extra-android-m2repository + - sys-img-armeabi-v7a-android-21 before_install: - - sudo pip install --upgrade pip - - sudo pip install six +# - sudo pip install --upgrade pip +# - sudo pip install six install: - - echo no | npm install -g nativescript - - tns usage-reporting disable - - tns error-reporting disable - - cd src - - npm i --ignore-scripts - - npm run tsc - - npm run package - - cd ../demo - - npm i + - echo no | npm install -g nativescript + - tns usage-reporting disable + - tns error-reporting disable + - cd src + - npm i --ignore-scripts + - npm run tsc + - npm run package + - cd ../demo + - npm i diff --git a/CHANGELOG.md b/CHANGELOG.md index 71104be5..7f62b4ba 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,51 @@ - [Firebase iOS SDK Changelog](https://firebase.google.com/support/release-notes/ios) - [Firebase Android SDK Changelog](https://firebase.google.com/support/release-notes/android) +## 8.2.0 (2019, April ?) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/98?closed=1) + +> Note: The Firebase iOS SDK now requires Xcode 10.1 or later. + +## 8.1.1 (2019, March 24) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/97?closed=1) + + +## 8.1.0 (2019, March 24) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/96?closed=1) + + +## 8.0.1 (2019, March 16) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/95?closed=1) + + +## 8.0.0 (2019, February 26) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/94?closed=1) + +### BREAKING CHANGES +- `getAuthToken` no longer returns a token (`string`), but an `GetAuthTokenResult` object which contains more data. See #1008. +- For better alignment with the Web API, `changePassword` is now `updatePassword`, `resetPassword` is now `sendPasswordResetEmail`. See #1080. + + +## 7.7.0 (2019, January 20) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/92?closed=1) + + +## 7.6.1 (2019, January 8) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/91?closed=1) + + +## 7.6.0 (2018, December 21) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/90?closed=1) + + +## 7.5.1 (2018, December 15) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/89?closed=1) + + +## 7.5.0 (2018, December 15) +[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/88?closed=1) + + ## 7.4.6 (2018, December 10) [Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/87?closed=1) diff --git a/README.md b/README.md index 6b4c9362..b37d4485 100755 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # NativeScript Firebase plugin -[![Build Status][build-status]][build-url] [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] +[![TotalDownloads][total-downloads-image]][npm-url] [![Twitter Follow][twitter-image]][twitter-url] [build-status]:https://travis-ci.org/EddyVerbruggen/nativescript-plugin-firebase.svg?branch=master @@ -10,6 +10,7 @@ [npm-image]:http://img.shields.io/npm/v/nativescript-plugin-firebase.svg [npm-url]:https://npmjs.org/package/nativescript-plugin-firebase [downloads-image]:http://img.shields.io/npm/dm/nativescript-plugin-firebase.svg +[total-downloads-image]:http://img.shields.io/npm/dt/nativescript-plugin-firebase.svg?label=total%20downloads [twitter-image]:https://img.shields.io/twitter/follow/eddyverbruggen.svg?style=social&label=Follow%20me [twitter-url]:https://twitter.com/eddyverbruggen @@ -109,7 +110,7 @@ firebase.init({ // Optionally pass in properties for database, authentication and cloud messaging, // see their respective docs. }).then( - function (instance) { + function () { console.log("firebase.init done"); }, function (error) { @@ -126,7 +127,7 @@ firebase.init({ // Optionally pass in properties for database, authentication and cloud messaging, // see their respective docs. }).then( - instance => { + () => { console.log("firebase.init done"); }, error => { @@ -149,7 +150,7 @@ export class AppComponent implements OnInit { // Optionally pass in properties for database, authentication and cloud messaging, // see their respective docs. }).then( - instance => { + () => { console.log("firebase.init done"); }, error => { diff --git a/demo-ng/app/App_Resources/Android/AndroidManifest.xml b/demo-ng/app/App_Resources/Android/AndroidManifest.xml index 1964d795..ef328945 100644 --- a/demo-ng/app/App_Resources/Android/AndroidManifest.xml +++ b/demo-ng/app/App_Resources/Android/AndroidManifest.xml @@ -30,9 +30,9 @@ android:label="@string/app_name" android:theme="@style/AppTheme"> - + > collectionRef.parent: " + collectionRef.parent); // should be null (has no parent) collectionRef.get() .then((querySnapshot: firestore.QuerySnapshot) => { querySnapshot.forEach(doc => console.log(`${doc.id} => ${JSON.stringify(doc.data())}`)); }) .catch(err => console.log("Get failed, error: " + err)); + // testing 'parent' + const bjDistrictsRef: firestore.CollectionReference = firebase.firestore().collection("cities").doc("BJ").collection("districts"); + console.log(">> bjDistrictsRef.parent.id: " + bjDistrictsRef.parent.id); + // examples from https://firebase.google.com/docs/firestore/query-data/get-data const docRef: firestore.DocumentReference = firebase.firestore().collection("cities").doc("BJ"); - - docRef.get().then((doc: firestore.DocumentSnapshot) => { - if (doc.exists) { - console.log("Document data:", JSON.stringify(doc.data())); - // since there's a reference stored here, we can use that to retrieve its data - const docRef: firestore.DocumentReference = doc.data().referenceToCitiesDC; - docRef.get().then(res => console.log("docref.get: " + JSON.stringify(res.data()))); - } else { - console.log("No such document!"); - } - }).catch(function (error) { - console.log("Error getting document:", error); - }); + console.log(">> docRef.parent.id: " + docRef.parent.id); + + docRef.get() + .then((doc: firestore.DocumentSnapshot) => { + if (doc.exists) { + console.log("Document data:", JSON.stringify(doc.data())); + // since there's a reference stored here, we can use that to retrieve its data + const docRef: firestore.DocumentReference = doc.data().referenceToCitiesDC; + console.log(">> docRef2.parent.id: " + docRef.parent.id); + docRef.get() + .then(res => console.log("docref.get: " + JSON.stringify(res.data()))) + .catch(err => console.log("docref.get error: " + err)); + } else { + console.log("No such document!"); + } + }).catch(error => console.log("Error getting document:", error)); } firestoreGetNested(): void { @@ -192,15 +200,15 @@ export class FirestoreComponent { .doc("QZNrg22tkN8W71YC3qCb"); // id of 'main st.' // .doc("doesntexist"); - mainStreetInSFDocRef.get().then((doc: firestore.DocumentSnapshot) => { - if (doc.exists) { - console.log("Document data:", JSON.stringify(doc.data())); - } else { - console.log("No such document!"); - } - }).catch(function (error) { - console.log("Error getting document:", error); - }); + mainStreetInSFDocRef.get() + .then((doc: firestore.DocumentSnapshot) => { + if (doc.exists) { + console.log("Document data:", JSON.stringify(doc.data())); + } else { + console.log("No such document!"); + } + }) + .catch(error => console.log("Error getting document:", error)); } deleteFields(): void { @@ -226,7 +234,8 @@ export class FirestoreComponent { .then(() => console.log("Woofie updated from 'delete'")) .catch(err => console.log("Updating Woofie from 'delete' failed, error: " + JSON.stringify(err))); }, 2000); - }); + }) + .catch(err => console.log("deleteFields error: " + err)); } arrayUnion(): void { @@ -236,8 +245,12 @@ export class FirestoreComponent { fieldToDelete: firestore.FieldValue.delete(), updateTs: firebase.firestore().FieldValue().serverTimestamp(), // just fyi - both of these work: - colors: firestore.FieldValue.arrayUnion("red", "blue") - // colors: firebase.firestore().FieldValue().arrayUnion(["red", "blue"]) + colors: firestore.FieldValue.arrayUnion("red", "blue"), + messages: firebase.firestore().FieldValue().arrayUnion({ + message: "Test 1", + source: "central", + time: Date.now() + }) }) .then(() => console.log("Woofie updated from 'arrayUnion'")) .catch(err => console.log("Updating Woofie from 'arrayUnion' failed, error: " + JSON.stringify(err))); @@ -248,7 +261,12 @@ export class FirestoreComponent { .update({ last: "Updated From 'arrayRemove'", updateTs: firebase.firestore().FieldValue().serverTimestamp(), - colors: firebase.firestore().FieldValue().arrayRemove("red") + colors: firestore.FieldValue.arrayUnion("red"), + messages: firebase.firestore().FieldValue().arrayRemove({ + message: "Test 1", + source: "central", + time: Date.now() + }) }) .then(() => console.log("Woofie updated from 'arrayRemove'")) .catch(err => console.log("Updating Woofie from 'arrayRemove' failed, error: " + JSON.stringify(err))); @@ -257,25 +275,38 @@ export class FirestoreComponent { firestoreDocumentObservable(): void { this.myCity$ = Observable.create(subscriber => { const docRef: firestore.DocumentReference = firebase.firestore().collection("cities").doc("SF"); - docRef.onSnapshot((doc: firestore.DocumentSnapshot) => { - this.zone.run(() => { - this.city = doc.data(); - subscriber.next(this.city); - }); - }); + docRef.onSnapshot( + {includeMetadataChanges: true}, + (doc: firestore.DocumentSnapshot) => { + + const source = doc.metadata.fromCache ? "local cache" : "server"; + console.log("Data came from " + source); + console.log("Has pending writes? " + doc.metadata.hasPendingWrites); + + this.zone.run(() => { + this.city = doc.data(); + subscriber.next(this.city); + }); + }); }); } firestoreCollectionObservable(): void { this.myCities$ = Observable.create(subscriber => { const colRef: firestore.CollectionReference = firebase.firestore().collection("cities"); - colRef.onSnapshot((snapshot: firestore.QuerySnapshot) => { - this.zone.run(() => { - this.cities = []; - snapshot.forEach(docSnap => this.cities.push(docSnap.data())); - subscriber.next(this.cities); - }); - }); + colRef.onSnapshot( + {includeMetadataChanges: true}, + (snapshot: firestore.QuerySnapshot) => { + const source = snapshot.metadata.fromCache ? "local cache" : "server"; + console.log("Data came from " + source); + console.log("Has pending writes? " + snapshot.metadata.hasPendingWrites); + + this.zone.run(() => { + this.cities = []; + snapshot.forEach(docSnap => this.cities.push(docSnap.data())); + subscriber.next(this.cities); + }); + }); }); } diff --git a/demo-ng/app/tabs/mlkit/barcodescanning/barcodescanning.component.html b/demo-ng/app/tabs/mlkit/barcodescanning/barcodescanning.component.html index febcdfd8..fc8e3064 100644 --- a/demo-ng/app/tabs/mlkit/barcodescanning/barcodescanning.component.html +++ b/demo-ng/app/tabs/mlkit/barcodescanning/barcodescanning.component.html @@ -6,7 +6,8 @@ - + diff --git a/demo-ng/app/tabs/mlkit/barcodescanning/barcodescanning.component.ts b/demo-ng/app/tabs/mlkit/barcodescanning/barcodescanning.component.ts index 64c75e31..8176b82e 100644 --- a/demo-ng/app/tabs/mlkit/barcodescanning/barcodescanning.component.ts +++ b/demo-ng/app/tabs/mlkit/barcodescanning/barcodescanning.component.ts @@ -1,5 +1,8 @@ import { Component } from "@angular/core"; -import { MLKitScanBarcodesOnDeviceResult } from "nativescript-plugin-firebase/mlkit/barcodescanning"; +import { + MLKitScanBarcodesOnDeviceResult, + MLKitScanBarcodesResultBarcode +} from "nativescript-plugin-firebase/mlkit/barcodescanning"; import { AbstractMLKitViewComponent } from "~/tabs/mlkit/abstract.mlkitview.component"; @Component({ @@ -8,10 +11,8 @@ import { AbstractMLKitViewComponent } from "~/tabs/mlkit/abstract.mlkitview.comp templateUrl: "./barcodescanning.component.html", }) export class BarcodeScanningComponent extends AbstractMLKitViewComponent { - barcodes: Array<{ - value: string; - format: string; - }>; + + barcodes: Array; pause: boolean = false; @@ -19,12 +20,11 @@ export class BarcodeScanningComponent extends AbstractMLKitViewComponent { const result: MLKitScanBarcodesOnDeviceResult = event.value; this.barcodes = result.barcodes; - console.log("this.barcodes: " + JSON.stringify(this.barcodes)); - if (this.barcodes.length > 0) { - console.log("pausing the scanner for 3 seconds (to test the 'pause' feature)"); + console.log("this.barcodes: " + JSON.stringify(this.barcodes)); + console.log("pausing the scanner for 1 second (to show the 'pause' feature)"); this.pause = true; - setTimeout(() => this.pause = false, 3000) + setTimeout(() => this.pause = false, 1000) } } } diff --git a/demo-ng/app/tabs/mlkit/custommodel/custommodel.component.html b/demo-ng/app/tabs/mlkit/custommodel/custommodel.component.html new file mode 100644 index 00000000..141262ca --- /dev/null +++ b/demo-ng/app/tabs/mlkit/custommodel/custommodel.component.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo-ng/app/tabs/mlkit/custommodel/custommodel.component.ts b/demo-ng/app/tabs/mlkit/custommodel/custommodel.component.ts new file mode 100644 index 00000000..31488508 --- /dev/null +++ b/demo-ng/app/tabs/mlkit/custommodel/custommodel.component.ts @@ -0,0 +1,20 @@ +import { Component } from "@angular/core"; +import { MLKitCustomModelResult } from "nativescript-plugin-firebase/mlkit/custommodel"; +import { AbstractMLKitViewComponent } from "~/tabs/mlkit/abstract.mlkitview.component"; + +@Component({ + selector: "mlkit-custommodel", + moduleId: module.id, + templateUrl: "./custommodel.component.html", +}) +export class CustomModelComponent extends AbstractMLKitViewComponent { + labels: Array<{ + text: string; + confidence: number; + }>; + + onCustomModelResult(scanResult: any): void { + const value: MLKitCustomModelResult = scanResult.value; + this.labels = value.result; + } +} diff --git a/demo-ng/app/tabs/mlkit/facedetection/facedetection.component.ts b/demo-ng/app/tabs/mlkit/facedetection/facedetection.component.ts index 38e0774a..453d8c29 100644 --- a/demo-ng/app/tabs/mlkit/facedetection/facedetection.component.ts +++ b/demo-ng/app/tabs/mlkit/facedetection/facedetection.component.ts @@ -16,6 +16,7 @@ export class FaceDetectionComponent extends AbstractMLKitViewComponent { const value: MLKitDetectFacesOnDeviceResult = scanResult.value; if (value.faces.length > 0) { this.faces = value.faces; + console.log("this.faces: " + JSON.stringify(this.faces)); let allSmilingAndEyesOpen = true; value.faces.forEach(face => { diff --git a/demo-ng/app/tabs/mlkit/mlkit.component.html b/demo-ng/app/tabs/mlkit/mlkit.component.html index b6fdc418..bc46ced7 100644 --- a/demo-ng/app/tabs/mlkit/mlkit.component.html +++ b/demo-ng/app/tabs/mlkit/mlkit.component.html @@ -4,7 +4,7 @@ - + diff --git a/demo-ng/app/tabs/mlkit/mlkit.component.ts b/demo-ng/app/tabs/mlkit/mlkit.component.ts index 9d6f8c18..746a0827 100644 --- a/demo-ng/app/tabs/mlkit/mlkit.component.ts +++ b/demo-ng/app/tabs/mlkit/mlkit.component.ts @@ -1,20 +1,21 @@ import { Component, NgZone } from "@angular/core"; import { RouterExtensions } from "nativescript-angular"; -import { fromFile, ImageSource } from "tns-core-modules/image-source"; -import * as fileSystemModule from "tns-core-modules/file-system"; -import { action } from "tns-core-modules/ui/dialogs"; -import { ImageAsset } from "tns-core-modules/image-asset"; -import { isIOS } from "tns-core-modules/platform"; -import * as ImagePicker from "nativescript-imagepicker"; import * as Camera from "nativescript-camera"; +import * as ImagePicker from "nativescript-imagepicker"; import { BarcodeFormat, MLKitScanBarcodesOnDeviceResult } from "nativescript-plugin-firebase/mlkit/barcodescanning"; -import { MLKitLandmarkRecognitionCloudResult } from "nativescript-plugin-firebase/mlkit/landmarkrecognition"; +import { MLKitCustomModelResult } from "nativescript-plugin-firebase/mlkit/custommodel"; import { MLKitDetectFacesOnDeviceResult } from "nativescript-plugin-firebase/mlkit/facedetection"; -import { MLKitRecognizeTextResult } from "nativescript-plugin-firebase/mlkit/textrecognition"; import { MLKitImageLabelingCloudResult, MLKitImageLabelingOnDeviceResult } from "nativescript-plugin-firebase/mlkit/imagelabeling"; +import { MLKitLandmarkRecognitionCloudResult } from "nativescript-plugin-firebase/mlkit/landmarkrecognition"; +import { MLKitRecognizeTextResult } from "nativescript-plugin-firebase/mlkit/textrecognition"; +import * as fileSystemModule from "tns-core-modules/file-system"; +import { ImageAsset } from "tns-core-modules/image-asset"; +import { fromFile, ImageSource } from "tns-core-modules/image-source"; +import { isIOS } from "tns-core-modules/platform"; +import { action } from "tns-core-modules/ui/dialogs"; const firebase = require("nativescript-plugin-firebase"); @@ -34,6 +35,7 @@ export class MLKitComponent { "Face detection (on device)", "Image labeling (on device)", "Image labeling (cloud)", + "Custom model", "Landmark recognition (cloud)" ]; @@ -41,7 +43,8 @@ export class MLKitComponent { "Text recognition", "Barcode scanning", "Face detection", - "Image labeling" + "Image labeling", + "Custom model" ]; constructor(private routerExtensions: RouterExtensions, @@ -63,6 +66,8 @@ export class MLKitComponent { to = "/tabs/mlkit/facedetection"; } else if (pickedItem === "Image labeling") { to = "/tabs/mlkit/imagelabeling"; + } else if (pickedItem === "Custom model") { + to = "/tabs/mlkit/custommodel"; } if (to !== undefined) { @@ -96,8 +101,8 @@ export class MLKitComponent { Camera.requestPermissions(); } Camera.takePicture({ - width: 800, - height: 800, + width: 600, + height: 600, keepAspectRatio: true, saveToGallery: true, cameraFacing: "rear" @@ -110,7 +115,7 @@ export class MLKitComponent { }); } - fromCameraroll(): void { + fromCameraRoll(): void { const imagePicker = ImagePicker.create({ mode: "single" }); @@ -122,8 +127,8 @@ export class MLKitComponent { if (selection.length === 0) return; const selected = selection[0]; - selected.options.height = 800; - selected.options.width = 800; + selected.options.height = 600; + selected.options.width = 600; selected.options.keepAspectRatio = true; selected.getImageAsync((image: any, error: any) => { if (error) { @@ -179,8 +184,8 @@ export class MLKitComponent { this.labelImageCloud(imageSource); } else if (pickedItem === "Landmark recognition (cloud)") { this.recognizeLandmarkCloud(imageSource); - // } else if (pickedItem === "Custom model (on device)") { - // this.customModelOnDevice(imageSource); + } else if (pickedItem === "Custom model") { + this.customModel(imageSource); } }); } @@ -230,6 +235,42 @@ export class MLKitComponent { .catch(errorMessage => console.log("ML Kit error: " + errorMessage)); } + private customModel(imageSource: ImageSource): void { + firebase.mlkit.custommodel.useCustomModel({ + image: imageSource, + + // note that only local quant models work currently (so not 'float' models, and not loaded from the cloud) + + // cloudModelName: "~/mobilenet_quant_v2_1_0_299", + // cloudModelName: "~/inception_v3_quant", + + // note that there's an issue with this model (making the app crash): "ValueError: Model provided has model identifier 'Mobi', should be 'TFL3'" (reported by https://github.com/EddyVerbruggen/ns-mlkit-tflite-curated/blob/master/scripts/get_model_details.py) + // localModelFile: "~/custommodel/nutella/nutella_quantize.tflite", + // labelsFile: "~/custommodel/nutella/nutella_labels.txt", + + // localModelFile: "~/custommodel/mobilenet/mobilenet_quant_v2_1.0_299.tflite", + // labelsFile: "~/custommodel/mobilenet/mobilenet_labels.txt", + + localModelFile: "~/custommodel/inception/inception_v3_quant.tflite", + labelsFile: "~/custommodel/inception/inception_labels.txt", + + maxResults: 5, + modelInput: [{ + // shape: [1, 224, 224, 3], // flowers / nutella + shape: [1, 299, 299, 3], // others + type: "QUANT" // the only currently supported type of model + }], + }).then( + (result: MLKitCustomModelResult) => { + alert({ + title: `Result`, + message: JSON.stringify(result.result), + okButtonText: "OK" + }); + }) + .catch(errorMessage => console.log("ML Kit error: " + errorMessage)); + } + private scanBarcodeOnDevice(imageSource: ImageSource): void { console.log(">>> imageSource.rotationAngle: " + imageSource.rotationAngle); firebase.mlkit.barcodescanning.scanBarcodesOnDevice({ diff --git a/demo-ng/app/tabs/tabs-routing.module.ts b/demo-ng/app/tabs/tabs-routing.module.ts index a882135f..46e0cd4a 100644 --- a/demo-ng/app/tabs/tabs-routing.module.ts +++ b/demo-ng/app/tabs/tabs-routing.module.ts @@ -7,13 +7,15 @@ import { TextRecognitionComponent } from "~/tabs/mlkit/textrecognition/textrecog import { BarcodeScanningComponent } from "~/tabs/mlkit/barcodescanning/barcodescanning.component"; import { FaceDetectionComponent } from "~/tabs/mlkit/facedetection/facedetection.component"; import { ImageLabelingComponent } from "~/tabs/mlkit/imagelabeling/imagelabeling.component"; +import { CustomModelComponent } from "~/tabs/mlkit/custommodel/custommodel.component"; const routes: Routes = [ { path: "", component: TabsComponent }, { path: "mlkit/textrecognition", component: TextRecognitionComponent }, { path: "mlkit/barcodescanning", component: BarcodeScanningComponent }, { path: "mlkit/facedetection", component: FaceDetectionComponent }, - { path: "mlkit/imagelabeling", component: ImageLabelingComponent } + { path: "mlkit/imagelabeling", component: ImageLabelingComponent }, + { path: "mlkit/custommodel", component: CustomModelComponent } ]; @NgModule({ diff --git a/demo-ng/app/tabs/tabs.module.ts b/demo-ng/app/tabs/tabs.module.ts index 2752508b..3ba0b307 100644 --- a/demo-ng/app/tabs/tabs.module.ts +++ b/demo-ng/app/tabs/tabs.module.ts @@ -10,12 +10,14 @@ import { TextRecognitionComponent } from "~/tabs/mlkit/textrecognition/textrecog import { BarcodeScanningComponent } from "~/tabs/mlkit/barcodescanning/barcodescanning.component"; import { FaceDetectionComponent } from "~/tabs/mlkit/facedetection/facedetection.component"; import { ImageLabelingComponent } from "~/tabs/mlkit/imagelabeling/imagelabeling.component"; +import { CustomModelComponent } from "~/tabs/mlkit/custommodel/custommodel.component"; import { registerElement } from "nativescript-angular/element-registry"; registerElement("MLKitBarcodeScanner", () => require("nativescript-plugin-firebase/mlkit/barcodescanning").MLKitBarcodeScanner); registerElement("MLKitFaceDetection", () => require("nativescript-plugin-firebase/mlkit/facedetection").MLKitFaceDetection); registerElement("MLKitTextRecognition", () => require("nativescript-plugin-firebase/mlkit/textrecognition").MLKitTextRecognition); registerElement("MLKitImageLabeling", () => require("nativescript-plugin-firebase/mlkit/imagelabeling").MLKitImageLabeling); +registerElement("MLKitCustomModel", () => require("nativescript-plugin-firebase/mlkit/custommodel").MLKitCustomModel); @NgModule({ imports: [ @@ -29,7 +31,8 @@ registerElement("MLKitImageLabeling", () => require("nativescript-plugin-firebas ImageLabelingComponent, MLKitComponent, TabsComponent, - TextRecognitionComponent + TextRecognitionComponent, + CustomModelComponent ], schemas: [ NO_ERRORS_SCHEMA diff --git a/demo-ng/firebase.nativescript.json b/demo-ng/firebase.nativescript.json index be4437a0..5a91893d 100644 --- a/demo-ng/firebase.nativescript.json +++ b/demo-ng/firebase.nativescript.json @@ -1,14 +1,18 @@ { + "external_push_client_only": false, "using_ios": true, "using_android": true, - "realtimedb": false, "firestore": true, + "realtimedb": false, + "authentication": true, "remote_config": false, "performance_monitoring": true, "messaging": false, - "crash_reporting": false, + "in_app_messaging": false, "crashlytics": false, + "crash_reporting": false, "storage": false, + "functions": false, "facebook_auth": false, "google_auth": false, "admob": false, @@ -19,5 +23,7 @@ "ml_kit_barcode_scanning": true, "ml_kit_face_detection": true, "ml_kit_image_labeling": true, - "ml_kit_custom_model": false -} + "ml_kit_custom_model": true, + "ml_kit_natural_language_identification": true, + "ml_kit_natural_language_smartreply": true +} \ No newline at end of file diff --git a/demo-ng/package.json b/demo-ng/package.json index 0dcfb80c..bd0add1f 100644 --- a/demo-ng/package.json +++ b/demo-ng/package.json @@ -6,10 +6,10 @@ "nativescript": { "id": "org.nativescript.firebasedemo.firestore", "tns-android": { - "version": "5.0.0" + "version": "5.1.0" }, "tns-ios": { - "version": "5.0.0" + "version": "5.1.0" } }, "dependencies": { @@ -23,13 +23,13 @@ "@angular/platform-browser-dynamic": "~6.1.0", "@angular/router": "~6.1.0", "nativescript-angular": "^6.1.0", - "nativescript-camera": "^4.0.2", - "nativescript-imagepicker": "~6.0.4", - "nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-7.4.6.tgz", + "nativescript-camera": "~4.1.1", + "nativescript-imagepicker": "~6.0.5", + "nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-8.2.0.tgz", "nativescript-theme-core": "~1.0.4", "reflect-metadata": "~0.1.10", "rxjs": "~6.0.0 || >=6.1.0", - "tns-core-modules": "~5.0.1", + "tns-core-modules": "~5.1.0", "zone.js": "~0.8.26" }, "devDependencies": { @@ -41,6 +41,6 @@ "lazy": "1.0.11", "nativescript-dev-typescript": "~0.7.0", "nativescript-dev-webpack": "^0.15.1", - "typescript": "~2.7.2" + "typescript": "~2.8.0" } -} \ No newline at end of file +} diff --git a/demo-push/app/package.json b/demo-push/app/package.json index 7c8be405..eb552dc7 100644 --- a/demo-push/app/package.json +++ b/demo-push/app/package.json @@ -26,9 +26,9 @@ }, "homepage": "https://github.com/NativeScript/template-hello-world-ts", "android": { - "v8Flags": "--expose_gc", - "discardUncaughtJsExceptions": true + "v8Flags": "--expose_gc" }, + "discardUncaughtJsExceptions": true, "devDependencies": { "nativescript-dev-typescript": "^0.3.0" }, diff --git a/demo-push/app_resources/iOS/GoogleService-Info.plist b/demo-push/app_resources/iOS/GoogleService-Info.plist new file mode 100644 index 00000000..03e23a4d --- /dev/null +++ b/demo-push/app_resources/iOS/GoogleService-Info.plist @@ -0,0 +1,40 @@ + + + + + AD_UNIT_ID_FOR_BANNER_TEST + ca-app-pub-3940256099942544/2934735716 + AD_UNIT_ID_FOR_INTERSTITIAL_TEST + ca-app-pub-3940256099942544/4411468910 + CLIENT_ID + 176080762547-8g2ls3h76dcgdt5uuingun2hiehl49r7.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.176080762547-8g2ls3h76dcgdt5uuingun2hiehl49r7 + API_KEY + AIzaSyC6yOZO4Kl0yGyRdyH_Z_Q0DysqvNYt3l0 + GCM_SENDER_ID + 176080762547 + PLIST_VERSION + 1 + BUNDLE_ID + org.nativescript.firebasedemo.firestore + PROJECT_ID + n-plugin-test-firestore + STORAGE_BUCKET + n-plugin-test-firestore.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:176080762547:ios:fbe95ab1f255d884 + DATABASE_URL + https://n-plugin-test-firestore.firebaseio.com + + \ No newline at end of file diff --git a/demo-push/package.json b/demo-push/package.json index db45056d..1d87659c 100644 --- a/demo-push/package.json +++ b/demo-push/package.json @@ -9,7 +9,7 @@ } }, "dependencies": { - "nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-7.4.6.tgz", + "nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-8.2.0.tgz", "nativescript-theme-core": "^1.0.4", "nativescript-unit-test-runner": "^0.3.4", "tns-core-modules": "~4.2.0" @@ -43,4 +43,4 @@ "build.plugin": "cd ../src && npm run build", "ci.tslint": "npm i && tslint --config '../tslint.json' 'app/**/*.ts' --exclude '**/node_modules/**' --exclude '**/typings/**'" } -} \ No newline at end of file +} diff --git a/demo-vue/.gitignore b/demo-vue/.gitignore new file mode 100644 index 00000000..b4a60da7 --- /dev/null +++ b/demo-vue/.gitignore @@ -0,0 +1,9 @@ +# JetBrains project files +.idea + +# NPM +node_modules + +# NativeScript application +hooks +platforms diff --git a/demo-vue/README.md b/demo-vue/README.md new file mode 100644 index 00000000..ec55eaf1 --- /dev/null +++ b/demo-vue/README.md @@ -0,0 +1,19 @@ +# Firebase Plugin Vue Demo + +> Vue demo app for the NativeScript Firebase plugin + +## Usage + +``` bash +# Install dependencies +npm install + +# Build for production +tns build --bundle + +# Build, watch for changes and debug the application +tns debug --bundle + +# Build, watch for changes and run the application +tns run --bundle +``` \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/app.gradle b/demo-vue/app/App_Resources/Android/app.gradle new file mode 100644 index 00000000..b0f962f4 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/app.gradle @@ -0,0 +1,11 @@ +// Add your native dependencies here: + +android { + defaultConfig { + generatedDensities = [] + applicationId = "org.nativescript.firebasedemo.firestore" + } + aaptOptions { + additionalParameters "--no-version-vectors" + } +} diff --git a/demo-vue/app/App_Resources/Android/google-services.json b/demo-vue/app/App_Resources/Android/google-services.json new file mode 100644 index 00000000..610a6c36 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/google-services.json @@ -0,0 +1,42 @@ +{ + "project_info": { + "project_number": "176080762547", + "firebase_url": "https://n-plugin-test-firestore.firebaseio.com", + "project_id": "n-plugin-test-firestore", + "storage_bucket": "n-plugin-test-firestore.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:176080762547:android:fbe95ab1f255d884", + "android_client_info": { + "package_name": "org.nativescript.firebasedemo.firestore" + } + }, + "oauth_client": [ + { + "client_id": "176080762547-e030nqu3u61ntnq5d3jilip6ik6au4cq.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyCbzMMocv610ByMwPvcv2W0h45btMojqLw" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 1, + "other_platform_oauth_client": [] + }, + "ads_service": { + "status": 2 + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/src/main/AndroidManifest.xml b/demo-vue/app/App_Resources/Android/src/main/AndroidManifest.xml new file mode 100644 index 00000000..ca537b8c --- /dev/null +++ b/demo-vue/app/App_Resources/Android/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png new file mode 100644 index 00000000..64200327 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png new file mode 100644 index 00000000..117b444a Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png new file mode 100644 index 00000000..711905f3 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png new file mode 100644 index 00000000..03befc22 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png new file mode 100644 index 00000000..bd04848e Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png new file mode 100644 index 00000000..af908e46 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png new file mode 100644 index 00000000..cfe4a7c2 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png new file mode 100644 index 00000000..32aa6176 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png new file mode 100644 index 00000000..c21ae444 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml b/demo-vue/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml new file mode 100644 index 00000000..ada77f92 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png new file mode 100644 index 00000000..b06ae267 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png new file mode 100644 index 00000000..12950046 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png new file mode 100644 index 00000000..4ad5346d Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png new file mode 100644 index 00000000..9bc7f010 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png new file mode 100644 index 00000000..541e7591 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png new file mode 100644 index 00000000..bcc40119 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png new file mode 100644 index 00000000..d93c3d8f Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png new file mode 100644 index 00000000..072b6013 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png new file mode 100644 index 00000000..96acb1ec Binary files /dev/null and b/demo-vue/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/src/main/res/values-v21/colors.xml b/demo-vue/app/App_Resources/Android/src/main/res/values-v21/colors.xml new file mode 100644 index 00000000..a64641a9 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/src/main/res/values-v21/colors.xml @@ -0,0 +1,4 @@ + + + #3d5afe + \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/src/main/res/values-v21/strings.xml b/demo-vue/app/App_Resources/Android/src/main/res/values-v21/strings.xml new file mode 100644 index 00000000..ef994511 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/src/main/res/values-v21/strings.xml @@ -0,0 +1,5 @@ + + + Firebase Plugin Vue Demo + Firebase Plugin Vue Demo + diff --git a/demo-vue/app/App_Resources/Android/src/main/res/values-v21/styles.xml b/demo-vue/app/App_Resources/Android/src/main/res/values-v21/styles.xml new file mode 100644 index 00000000..acff7c9c --- /dev/null +++ b/demo-vue/app/App_Resources/Android/src/main/res/values-v21/styles.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/src/main/res/values/colors.xml b/demo-vue/app/App_Resources/Android/src/main/res/values/colors.xml new file mode 100644 index 00000000..2d0390d8 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/src/main/res/values/colors.xml @@ -0,0 +1,7 @@ + + + #F5F5F5 + #53ba82 + #33B5E5 + #272734 + diff --git a/demo-vue/app/App_Resources/Android/src/main/res/values/strings.xml b/demo-vue/app/App_Resources/Android/src/main/res/values/strings.xml new file mode 100644 index 00000000..ef994511 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/src/main/res/values/strings.xml @@ -0,0 +1,5 @@ + + + Firebase Plugin Vue Demo + Firebase Plugin Vue Demo + diff --git a/demo-vue/app/App_Resources/Android/src/main/res/values/styles.xml b/demo-vue/app/App_Resources/Android/src/main/res/values/styles.xml new file mode 100644 index 00000000..fae0f4b7 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/src/main/res/values/styles.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..4034b76e --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "icon-83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "icon-1024.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png new file mode 100644 index 00000000..fe7c5040 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png new file mode 100644 index 00000000..275ddd11 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png new file mode 100644 index 00000000..906e4b4c Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png new file mode 100644 index 00000000..5b9a78e3 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png new file mode 100644 index 00000000..3e4a7ea5 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png new file mode 100644 index 00000000..f1cf7ae0 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png new file mode 100644 index 00000000..a6b0b6fc Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png new file mode 100644 index 00000000..091c1360 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png new file mode 100644 index 00000000..eb0279cf Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png new file mode 100644 index 00000000..42d84e1c Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png new file mode 100644 index 00000000..50f1e707 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png new file mode 100644 index 00000000..11dc75f5 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/Contents.json b/demo-vue/app/App_Resources/iOS/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 00000000..11bfcf55 --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,176 @@ +{ + "images" : [ + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "2436h", + "filename" : "Default-1125h.png", + "minimum-system-version" : "11.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "orientation" : "landscape", + "idiom" : "iphone", + "extent" : "full-screen", + "filename" : "Default-Landscape-X.png", + "minimum-system-version" : "11.0", + "subtype" : "2436h", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "Default-736h@3x.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "Default-Landscape@3x.png", + "minimum-system-version" : "8.0", + "orientation" : "landscape", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "667h", + "filename" : "Default-667h@2x.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "retina4", + "filename" : "Default-568h@2x.png", + "minimum-system-version" : "7.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default@2x.png", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default-568h@2x.png", + "extent" : "full-screen", + "subtype" : "retina4", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait@2x.png", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape@2x.png", + "extent" : "full-screen", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png new file mode 100644 index 00000000..2913f85d Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png new file mode 100644 index 00000000..d7f17fcd Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png new file mode 100644 index 00000000..b8841540 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png new file mode 100644 index 00000000..faab4b63 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png new file mode 100644 index 00000000..cd94a3ac Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png new file mode 100644 index 00000000..3365ba3c Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png new file mode 100644 index 00000000..a44945c1 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png new file mode 100644 index 00000000..e6dca626 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png new file mode 100644 index 00000000..1a500796 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png new file mode 100644 index 00000000..73d8b920 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png new file mode 100644 index 00000000..9f1f6ce3 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png new file mode 100644 index 00000000..514fc5cd Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json new file mode 100644 index 00000000..4f4e9c50 --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png new file mode 100644 index 00000000..c293f9c7 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png new file mode 100644 index 00000000..233693a6 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json new file mode 100644 index 00000000..23c0ffd7 --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png new file mode 100644 index 00000000..a5a775a2 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png new file mode 100644 index 00000000..154c1934 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/GoogleService-Info.plist b/demo-vue/app/App_Resources/iOS/GoogleService-Info.plist new file mode 100644 index 00000000..03e23a4d --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/GoogleService-Info.plist @@ -0,0 +1,40 @@ + + + + + AD_UNIT_ID_FOR_BANNER_TEST + ca-app-pub-3940256099942544/2934735716 + AD_UNIT_ID_FOR_INTERSTITIAL_TEST + ca-app-pub-3940256099942544/4411468910 + CLIENT_ID + 176080762547-8g2ls3h76dcgdt5uuingun2hiehl49r7.apps.googleusercontent.com + REVERSED_CLIENT_ID + com.googleusercontent.apps.176080762547-8g2ls3h76dcgdt5uuingun2hiehl49r7 + API_KEY + AIzaSyC6yOZO4Kl0yGyRdyH_Z_Q0DysqvNYt3l0 + GCM_SENDER_ID + 176080762547 + PLIST_VERSION + 1 + BUNDLE_ID + org.nativescript.firebasedemo.firestore + PROJECT_ID + n-plugin-test-firestore + STORAGE_BUCKET + n-plugin-test-firestore.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:176080762547:ios:fbe95ab1f255d884 + DATABASE_URL + https://n-plugin-test-firestore.firebaseio.com + + \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Info.plist b/demo-vue/app/App_Resources/iOS/Info.plist new file mode 100644 index 00000000..9fd4973f --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Info.plist @@ -0,0 +1,62 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + Firebase Plugin Vue Demo + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0.0 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiresFullScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLName + firebasedemovue.page.link + CFBundleURLSchemes + + org.nativescript.firebasedemo.firestore + + + + + + diff --git a/demo-vue/app/App_Resources/iOS/LaunchScreen.storyboard b/demo-vue/app/App_Resources/iOS/LaunchScreen.storyboard new file mode 100644 index 00000000..2ad9471e --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/LaunchScreen.storyboard @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo-vue/app/App_Resources/iOS/app.entitlements b/demo-vue/app/App_Resources/iOS/app.entitlements new file mode 100644 index 00000000..205ac37d --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/app.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.developer.associated-domains + + applinks:j4ctx.app.goo.gl + + + \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/build.xcconfig b/demo-vue/app/App_Resources/iOS/build.xcconfig new file mode 100644 index 00000000..d452798a --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/build.xcconfig @@ -0,0 +1,10 @@ +// You can add custom settings here +// for example you can uncomment the following line to force distribution code signing +// CODE_SIGN_IDENTITY = iPhone Distribution +// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html +// DEVELOPMENT_TEAM = YOUR_TEAM_ID; +ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; +ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + +CODE_SIGN_ENTITLEMENTS = demovue/demovue.entitlements +DEVELOPMENT_TEAM = 8Q5F6M3TNS diff --git a/demo-vue/app/app.scss b/demo-vue/app/app.scss new file mode 100644 index 00000000..59ab05ad --- /dev/null +++ b/demo-vue/app/app.scss @@ -0,0 +1,10 @@ +// NativeScript core theme +// @see https://docs.nativescript.org/ui/theme +@import '~nativescript-theme-core/scss/dark'; + +// Override variables here + +@import '~nativescript-theme-core/scss/index'; + +// Global SCSS styling +// @see https://docs.nativescript.org/ui/styling diff --git a/demo-vue/app/assets/images/NativeScript-Vue.png b/demo-vue/app/assets/images/NativeScript-Vue.png new file mode 100644 index 00000000..2ad8ed20 Binary files /dev/null and b/demo-vue/app/assets/images/NativeScript-Vue.png differ diff --git a/demo-vue/app/components/App.vue b/demo-vue/app/components/App.vue new file mode 100644 index 00000000..fae2cf7b --- /dev/null +++ b/demo-vue/app/components/App.vue @@ -0,0 +1,141 @@ + + + + + diff --git a/demo-vue/app/fonts/.gitkeep b/demo-vue/app/fonts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/demo-vue/app/main.js b/demo-vue/app/main.js new file mode 100644 index 00000000..a20282f1 --- /dev/null +++ b/demo-vue/app/main.js @@ -0,0 +1,12 @@ +import Vue from "nativescript-vue"; +import App from "./components/App"; + +require("nativescript-plugin-firebase"); +Vue.registerElement("MLKitTextRecognition", () => require("nativescript-plugin-firebase/mlkit/textrecognition").MLKitTextRecognition); + +// Prints Vue logs when --env.production is *NOT* set while building +Vue.config.silent = (TNS_ENV === "production"); + +new Vue({ + render: h => h('frame', [h(App)]) +}).$start(); diff --git a/demo-vue/app/package.json b/demo-vue/app/package.json new file mode 100644 index 00000000..1296b84f --- /dev/null +++ b/demo-vue/app/package.json @@ -0,0 +1,9 @@ +{ + "android": { + "v8Flags": "--expose_gc" + }, + "discardUncaughtJsExceptions": true, + "main": "main", + "name": "demo-vue", + "version": "1.0.0" +} diff --git a/demo-vue/firebase.nativescript.json b/demo-vue/firebase.nativescript.json new file mode 100644 index 00000000..a2db98ce --- /dev/null +++ b/demo-vue/firebase.nativescript.json @@ -0,0 +1,23 @@ +{ + "external_push_client_only": false, + "using_ios": true, + "using_android": true, + "firestore": false, + "realtimedb": false, + "authentication": true, + "remote_config": false, + "performance_monitoring": false, + "messaging": false, + "in_app_messaging": true, + "crashlytics": false, + "crash_reporting": false, + "storage": false, + "functions": false, + "facebook_auth": false, + "google_auth": false, + "admob": false, + "invites": false, + "dynamic_links": true, + "ml_kit": true, + "ml_kit_text_recognition": true +} \ No newline at end of file diff --git a/demo-vue/package.json b/demo-vue/package.json new file mode 100644 index 00000000..33b06f50 --- /dev/null +++ b/demo-vue/package.json @@ -0,0 +1,44 @@ +{ + "name": "demo-vue", + "version": "1.0.0", + "description": "Vue demo app for the NativeScript Firebase plugin", + "author": "EddyVerbruggen ", + "license": "MIT", + "nativescript": { + "id": "org.nativescript.firebasedemo.firestore", + "tns-ios": { + "version": "5.0.0" + }, + "tns-android": { + "version": "5.0.0" + } + }, + "dependencies": { + "nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-8.2.0.tgz", + "nativescript-theme-core": "^1.0.4", + "nativescript-vue": "^2.0.0", + "tns-core-modules": "^5.0.2" + }, + "devDependencies": { + "@babel/core": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "babel-loader": "^8.0.2", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "clean-webpack-plugin": "^0.1.19", + "copy-webpack-plugin": "^4.5.2", + "css-loader": "^1.0.0", + "lazy": "1.0.11", + "nativescript-dev-webpack": "next", + "nativescript-vue-template-compiler": "^2.0.0", + "nativescript-worker-loader": "~0.9.0", + "node-sass": "^4.9.2", + "sass-loader": "^7.1.0", + "terser-webpack-plugin": "^1.1.0", + "vue-loader": "^15.2.6", + "webpack": "^4.16.4", + "webpack-bundle-analyzer": "~2.13.1", + "webpack-cli": "^3.1.0" + } +} diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml index 5fac77ad..eaf82bc5 100644 --- a/demo/app/main-page.xml +++ b/demo/app/main-page.xml @@ -18,7 +18,7 @@