Skip to content

Commit e9c5b72

Browse files
Touch ID strange behavior IOS13 #64
1 parent d453e12 commit e9c5b72

File tree

6 files changed

+23
-46
lines changed

6 files changed

+23
-46
lines changed

demo/app/main-view-model.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,7 @@ export class HelloWorldModel extends Observable {
4747
message: "Scan yer finger", // optional
4848
authenticationValidityDuration: 10 // Android
4949
})
50-
.then(() => {
51-
alert({
52-
title: "Biometric ID / passcode OK",
53-
okButtonText: "Sweet"
54-
});
55-
})
50+
.then(() => this.set("status", "Biometric ID / passcode OK"))
5651
.catch(err => {
5752
alert({
5853
title: "Biometric ID NOT OK / canceled",
@@ -95,13 +90,7 @@ export class HelloWorldModel extends Observable {
9590
fallbackMessage: "Enter PIN", // optional
9691
authenticationValidityDuration: 10 // Android
9792
})
98-
.then(() => {
99-
this.set("status", "Biometric ID OK");
100-
alert({
101-
title: "Biometric ID OK",
102-
okButtonText: "Sweet"
103-
});
104-
})
93+
.then(() => this.set("status", "Biometric ID OK"))
10594
.catch(error => {
10695
this.set("status", "Biometric ID NOT OK: " + JSON.stringify(error));
10796
alert({

demo/nsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{
2-
"useLegacyWorkflow": true
3-
}
1+
{}

demo/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
"nativescript": {
33
"id": "org.nativescript.fingerprintauth",
44
"tns-ios": {
5-
"version": "6.0.0-2019-06-10-154118-03"
5+
"version": "6.1.1"
66
},
77
"tns-android": {
8-
"version": "6.0.0-rc-2019-07-04-174325-01"
8+
"version": "6.1.1"
99
}
1010
},
1111
"dependencies": {
1212
"nativescript-fingerprint-auth": "file:../src",
13-
"nativescript-theme-core": "^1.0.4",
14-
"nativescript-unit-test-runner": "0.6.3",
15-
"tns-core-modules": "6.0.0-next-2019-06-20-155941-01"
13+
"nativescript-theme-core": "~1.0.6",
14+
"nativescript-unit-test-runner": "0.7.0",
15+
"tns-core-modules": "~6.1.1"
1616
},
1717
"devDependencies": {
18-
"tns-platform-declarations": "rc",
19-
"typescript": "3.4.1",
20-
"nativescript-dev-webpack": "rc",
18+
"tns-platform-declarations": "~6.1.1",
19+
"typescript": "3.4.5",
20+
"nativescript-dev-webpack": "~1.2.0",
2121
"karma-webpack": "3.0.5"
2222
}
2323
}

demo/tsconfig.tns.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "./tsconfig",
33
"compilerOptions": {
4-
"module": "es2015",
4+
"module": "esNext",
55
"moduleResolution": "node"
66
}
77
}

demo/webpack.config.js

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ module.exports = env => {
2828

2929
// Default destination inside platforms/<platform>/...
3030
const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));
31-
const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS";
3231

3332
const {
3433
// The 'appPath' and 'appResourcesPath' values are fetched from
35-
// the nsconfig.json configuration file
36-
// when bundling with `tns run android|ios --bundle`.
34+
// the nsconfig.json configuration file.
3735
appPath = "app",
3836
appResourcesPath = "app/App_Resources",
3937

@@ -63,7 +61,7 @@ module.exports = env => {
6361
const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("tns-core-modules") > -1);
6462
if (platform === "ios" && !areCoreModulesExternal) {
6563
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules";
66-
}
64+
};
6765

6866
let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist);
6967

@@ -73,6 +71,7 @@ module.exports = env => {
7371
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`);
7472
}
7573

74+
nsWebpack.processAppComponents(appComponents, platform);
7675
const config = {
7776
mode: production ? "production" : "development",
7877
context: appFullPath,
@@ -164,7 +163,7 @@ module.exports = env => {
164163
module: {
165164
rules: [
166165
{
167-
test: nsWebpack.getEntryPathRegExp(appFullPath, entryPath),
166+
include: join(appFullPath, entryPath),
168167
use: [
169168
// Require all Android app components
170169
platform === "android" && {
@@ -179,24 +178,15 @@ module.exports = env => {
179178
unitTesting,
180179
appFullPath,
181180
projectRoot,
181+
ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform)
182182
}
183183
},
184184
].filter(loader => !!loader)
185185
},
186-
187-
{
188-
test: /-page\.ts$/,
189-
use: "nativescript-dev-webpack/script-hot-loader"
190-
},
191-
192-
{
193-
test: /\.(css|scss)$/,
194-
use: "nativescript-dev-webpack/style-hot-loader"
195-
},
196-
186+
197187
{
198-
test: /\.(html|xml)$/,
199-
use: "nativescript-dev-webpack/markup-hot-loader"
188+
test: /\.(ts|css|scss|html|xml)$/,
189+
use: "nativescript-dev-webpack/hmr/hot-loader"
200190
},
201191

202192
{ test: /\.(html|xml)$/, use: "nativescript-dev-webpack/xml-namespace-loader" },
@@ -237,7 +227,7 @@ module.exports = env => {
237227
// Define useful constants like TNS_WEBPACK
238228
new webpack.DefinePlugin({
239229
"global.TNS_WEBPACK": "true",
240-
"process": undefined,
230+
"process": "global.process",
241231
}),
242232
// Remove all files from the out dir.
243233
new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }),

src/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@
6565
"homepage": "https://github.com/eddyverbruggen/nativescript-fingerprint-auth",
6666
"readmeFilename": "README.md",
6767
"devDependencies": {
68-
"tns-core-modules": "next",
69-
"tns-platform-declarations": "next",
68+
"tns-core-modules": "~6.1.1",
69+
"tns-platform-declarations": "~6.1.1",
7070
"typescript": "~3.4.5",
7171
"tslint": "^5.17.0"
7272
}

0 commit comments

Comments
 (0)