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

Commit b5df551

Browse files
authored
Merge pull request #6 from EddyVerbruggen/master
took pull
2 parents 3cdbc3a + e47b75e commit b5df551

51 files changed

Lines changed: 4482 additions & 3233 deletions

Some content is hidden

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

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
- [Firebase iOS SDK Changelog](https://firebase.google.com/support/release-notes/ios)
44
- [Firebase Android SDK Changelog](https://firebase.google.com/support/release-notes/android)
55

6+
## 10.2.0 (2019, Nov 18)
7+
[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/116?closed=1)
8+
9+
610
## 10.1.1 (2019, Oct 29)
711
[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/114?closed=1)
812

demo-ng/app/App_Resources/iOS/Info.plist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
<string>1.0</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
25+
<!-- Making sure Dark Mode is not applied -->
26+
<key>UIUserInterfaceStyle</key>
27+
<string>Light</string>
2528
<key>UILaunchStoryboardName</key>
2629
<string>LaunchScreen</string>
2730
<key>UIRequiresFullScreen</key>

demo-ng/app/tabs/firestore/firestore.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<Button text="Stop listening" (tap)="firestoreStopListening()" class="button"></Button>
2828
<Button text="Where (by reference)" (tap)="firestoreWhere()" class="button"></Button>
2929
<Button text="Where, Order, Limit" (tap)="firestoreWhereOrderLimit()" class="button"></Button>
30-
<Button text="Where array_contains" (tap)="firestoreWhereCityHasALake()" class="button"></Button>
30+
<Button text="Where array_contains" (tap)="firestoreWhereCityHasALakeAndOrMountain()" class="button"></Button>
3131
<Button text="Start at 'LA'" (tap)="firestoreStartAt()" class="button"></Button>
3232
<Button text="Start after 'LA'" (tap)="firestoreStartAfter()" class="button"></Button>
3333
<Button text="Delete" (tap)="firestoreDelete()" class="button"></Button>

demo-ng/app/tabs/firestore/firestore.component.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ export class FirestoreComponent {
277277
}
278278

279279
firestoreDocumentObservable(): void {
280-
this.myCity$ = Observable.create(subscriber => {
280+
this.myCity$ = new Observable(subscriber => {
281281
const docRef: firestore.DocumentReference = firebase.firestore().collection("cities").doc("SF");
282282
docRef.onSnapshot(
283283
{includeMetadataChanges: true},
@@ -289,14 +289,15 @@ export class FirestoreComponent {
289289

290290
this.zone.run(() => {
291291
this.city = <City>doc.data();
292+
console.log("City name: " + this.city.name);
292293
subscriber.next(this.city);
293294
});
294295
});
295296
});
296297
}
297298

298299
firestoreCollectionObservable(): void {
299-
this.myCities$ = Observable.create(subscriber => {
300+
this.myCities$ = new Observable(subscriber => {
300301
const colRef: firestore.CollectionReference = firebase.firestore().collection("cities");
301302
colRef.onSnapshot(
302303
{includeMetadataChanges: true},
@@ -357,24 +358,25 @@ export class FirestoreComponent {
357358

358359
firestoreWhereOrderLimit(): void {
359360
const query: firestore.Query = firebase.firestore().collection("cities")
360-
.where("state", "==", "CA")
361+
// .where("state", "==", "CA")
362+
.where("state", "in", ["CA", "WA"])
361363
.where("population", "<", 99999999)
362364
.orderBy("population", "desc")
363-
.limit(2);
365+
.limit(4);
364366

365367
query
366368
.get()
367369
.then((querySnapshot: firestore.QuerySnapshot) => {
368370
querySnapshot.forEach(doc => {
369-
console.log(`Large Californian city: ${doc.id} => ${JSON.stringify(doc.data())}`);
371+
console.log(`Large CA/WA city: ${doc.id} => ${JSON.stringify(doc.data())}`);
370372
});
371373
})
372374
.catch(err => console.log("firestoreWhereOrderLimit failed, error: " + err));
373375
}
374376

375-
firestoreWhereCityHasALake(): void {
377+
firestoreWhereCityHasALakeAndOrMountain(): void {
376378
const query: firestore.Query = firebase.firestore().collection("cities")
377-
.where("landmarks", "array-contains", "lake");
379+
.where("landmarks", "array-contains-any", ["mountain", "lake"]);
378380

379381
query
380382
.get()

demo-ng/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"nativescript": {
77
"id": "org.nativescript.firebasedemo.firestore",
88
"tns-android": {
9-
"version": "6.1.0"
9+
"version": "6.2.0"
1010
},
1111
"tns-ios": {
12-
"version": "6.1.0"
12+
"version": "6.2.0"
1313
}
1414
},
1515
"dependencies": {
@@ -25,11 +25,11 @@
2525
"nativescript-angular": "~8.0.3",
2626
"nativescript-camera": "~4.5.0",
2727
"nativescript-imagepicker": "~6.2.0",
28-
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.1.2.tgz",
28+
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.2.0.tgz",
2929
"nativescript-theme-core": "~1.0.6",
3030
"reflect-metadata": "~0.1.13",
3131
"rxjs": "~6.5.2",
32-
"tns-core-modules": "~6.1.1",
32+
"tns-core-modules": "~6.2.0",
3333
"zone.js": "~0.10.0"
3434
},
3535
"devDependencies": {
@@ -39,7 +39,7 @@
3939
"babel-types": "6.26.0",
4040
"babylon": "6.18.0",
4141
"lazy": "1.0.11",
42-
"nativescript-dev-webpack": "~1.2.0",
42+
"nativescript-dev-webpack": "~1.3.0",
4343
"typescript": "3.4.5"
4444
}
4545
}

demo-ng/webpack.config.js

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const { nsReplaceBootstrap } = require("nativescript-dev-webpack/transformers/ns
77
const { nsReplaceLazyLoader } = require("nativescript-dev-webpack/transformers/ns-replace-lazy-loader");
88
const { nsSupportHmrNg } = require("nativescript-dev-webpack/transformers/ns-support-hmr-ng");
99
const { getMainModulePath } = require("nativescript-dev-webpack/utils/ast-utils");
10+
const { getNoEmitOnErrorFromTSConfig } = require("nativescript-dev-webpack/utils/tsconfig-utils");
1011
const CleanWebpackPlugin = require("clean-webpack-plugin");
1112
const CopyWebpackPlugin = require("copy-webpack-plugin");
1213
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
@@ -35,8 +36,7 @@ module.exports = env => {
3536

3637
const {
3738
// The 'appPath' and 'appResourcesPath' values are fetched from
38-
// the nsconfig.json configuration file
39-
// when bundling with `tns run android|ios --bundle`.
39+
// the nsconfig.json configuration file.
4040
appPath = "src",
4141
appResourcesPath = "App_Resources",
4242

@@ -51,8 +51,12 @@ module.exports = env => {
5151
hmr, // --env.hmr,
5252
unitTesting, // --env.unitTesting
5353
verbose, // --env.verbose
54+
snapshotInDocker, // --env.snapshotInDocker
55+
skipSnapshotTools, // --env.skipSnapshotTools
56+
compileSnapshot // --env.compileSnapshot
5457
} = env;
5558

59+
const useLibs = compileSnapshot;
5660
const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap;
5761
const externals = nsWebpack.getConvertedExternals(env.externals);
5862
const appFullPath = resolve(projectRoot, appPath);
@@ -108,6 +112,8 @@ module.exports = env => {
108112
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`);
109113
}
110114

115+
const noEmitOnErrorFromTSConfig = getNoEmitOnErrorFromTSConfig(join(projectRoot, tsConfigName));
116+
111117
nsWebpack.processAppComponents(appComponents, platform);
112118
const config = {
113119
mode: production ? "production" : "development",
@@ -159,6 +165,7 @@ module.exports = env => {
159165
devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"),
160166
optimization: {
161167
runtimeChunk: "single",
168+
noEmitOnErrors: noEmitOnErrorFromTSConfig,
162169
splitChunks: {
163170
cacheGroups: {
164171
vendor: {
@@ -221,19 +228,24 @@ module.exports = env => {
221228

222229
{ test: /\.html$|\.xml$/, use: "raw-loader" },
223230

224-
// tns-core-modules reads the app.css and its imports using css-loader
225231
{
226232
test: /[\/|\\]app\.css$/,
227233
use: [
228234
"nativescript-dev-webpack/style-hot-loader",
229-
{ loader: "css-loader", options: { url: false } }
235+
{
236+
loader: "nativescript-dev-webpack/css2json-loader",
237+
options: { useForImports: true }
238+
}
230239
]
231240
},
232241
{
233242
test: /[\/|\\]app\.scss$/,
234243
use: [
235244
"nativescript-dev-webpack/style-hot-loader",
236-
{ loader: "css-loader", options: { url: false } },
245+
{
246+
loader: "nativescript-dev-webpack/css2json-loader",
247+
options: { useForImports: true }
248+
},
237249
"sass-loader"
238250
]
239251
},
@@ -272,7 +284,6 @@ module.exports = env => {
272284
{ from: { glob: "fonts/**" } },
273285
{ from: { glob: "**/*.jpg" } },
274286
{ from: { glob: "**/*.png" } },
275-
{ from: { glob: "custommodel/**" } },
276287
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
277288
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
278289
// For instructions on how to set up workers with webpack
@@ -310,6 +321,9 @@ module.exports = env => {
310321
],
311322
projectRoot,
312323
webpackConfig: config,
324+
snapshotInDocker,
325+
skipSnapshotTools,
326+
useLibs
313327
}));
314328
}
315329

demo-push/app_resources/iOS/Info.plist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
<string>1.0</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
25+
<!-- Making sure Dark Mode is not applied -->
26+
<key>UIUserInterfaceStyle</key>
27+
<string>Light</string>
2528
<key>UILaunchStoryboardName</key>
2629
<string>LaunchScreen</string>
2730
<key>UIRequiresFullScreen</key>

demo-push/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
},
1111
"dependencies": {
12-
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.1.2.tgz",
12+
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.2.0.tgz",
1313
"nativescript-theme-core": "~1.0.6",
1414
"nativescript-unit-test-runner": "0.7.0",
1515
"tns-core-modules": "~6.1.1"

demo-vue/app/App_Resources/iOS/Info.plist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
<string>1.0.0</string>
2323
<key>LSRequiresIPhoneOS</key>
2424
<true/>
25+
<!-- Making sure Dark Mode is not applied -->
26+
<key>UIUserInterfaceStyle</key>
27+
<string>Light</string>
2528
<key>UILaunchStoryboardName</key>
2629
<string>LaunchScreen</string>
2730
<key>UIRequiresFullScreen</key>

demo-vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515
},
1616
"dependencies": {
17-
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.1.2.tgz",
17+
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-10.2.0.tgz",
1818
"nativescript-theme-core": "~1.0.6",
1919
"nativescript-vue": "~2.4.0",
2020
"tns-core-modules": "~6.1.1"

0 commit comments

Comments
 (0)