diff --git a/ios/App/App/Info.plist b/ios/App/App/Info.plist
index 113c4a5..d6dc42a 100644
--- a/ios/App/App/Info.plist
+++ b/ios/App/App/Info.plist
@@ -5,7 +5,9 @@
CFBundleDevelopmentRegion
en
CFBundleDisplayName
- semmie-poc
+ semmie-poc
+ NSFaceIDUsageDescription
+ Privacy - Face ID Usage Description
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
diff --git a/ios/App/App/config.xml b/ios/App/App/config.xml
index 1b1b0e0..384b878 100644
--- a/ios/App/App/config.xml
+++ b/ios/App/App/config.xml
@@ -2,5 +2,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/ios/App/Podfile b/ios/App/Podfile
index c3a4afe..9650e98 100644
--- a/ios/App/Podfile
+++ b/ios/App/Podfile
@@ -13,6 +13,7 @@ def capacitor_pods
pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
+ pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins'
end
target 'App' do
diff --git a/package-lock.json b/package-lock.json
index 17d92b2..6f3095e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -26,8 +26,10 @@
"@capacitor/status-bar": "1.0.8",
"@datorama/akita": "^7.1.1",
"@datorama/akita-ngdevtools": "^7.0.0",
+ "@ionic-native/fingerprint-aio": "^5.36.0",
"@ionic/angular": "^6.0.0",
"chart.js": "^3.7.1",
+ "cordova-plugin-fingerprint-aio": "^5.0.1",
"rxjs": "~6.6.0",
"tslib": "^2.2.0",
"zone.js": "~0.11.4"
@@ -2727,6 +2729,30 @@
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
"dev": true
},
+ "node_modules/@ionic-native/core": {
+ "version": "5.36.0",
+ "resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-5.36.0.tgz",
+ "integrity": "sha512-lOrkktadlKYbYf1LrDyAtsu1JnQ0oCCdkOU7iHQ8oXnNOkMwobFfD2m62F1CoOr0u9LIkpYnZSPjng8lZbmbNw==",
+ "peer": true,
+ "dependencies": {
+ "@types/cordova": "latest"
+ },
+ "peerDependencies": {
+ "rxjs": "^5.5.0 || ^6.5.0"
+ }
+ },
+ "node_modules/@ionic-native/fingerprint-aio": {
+ "version": "5.36.0",
+ "resolved": "https://registry.npmjs.org/@ionic-native/fingerprint-aio/-/fingerprint-aio-5.36.0.tgz",
+ "integrity": "sha512-zd1PAfMsW4Inx/Vi399O29LWr9R1q0Gcj/2g86PZWSb0KnMG8dCoKoXKmkN3+HhajA/cdXaHEJWXbv+t6VlX8Q==",
+ "dependencies": {
+ "@types/cordova": "latest"
+ },
+ "peerDependencies": {
+ "@ionic-native/core": "^5.1.0",
+ "rxjs": "^5.5.0 || ^6.5.0"
+ }
+ },
"node_modules/@ionic/angular": {
"version": "6.0.9",
"resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-6.0.9.tgz",
@@ -9408,6 +9434,21 @@
"url": "https://opencollective.com/webpack"
}
},
+ "node_modules/cordova-plugin-fingerprint-aio": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/cordova-plugin-fingerprint-aio/-/cordova-plugin-fingerprint-aio-5.0.1.tgz",
+ "integrity": "sha512-gZSBu7ZWmqy/Sf+LEnGv6/a5zLIZwijRsQ8nAxdlU94VHOyPB8yGTzSImBJvvShzr+BJ5GkJcv5iffUNpanXtQ==",
+ "engines": {
+ "cordovaDependencies": {
+ ">=3.0.0": {
+ "cordova-android": ">=8.0.0"
+ }
+ }
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/NiklasMerz"
+ }
+ },
"node_modules/core-js": {
"version": "3.19.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.19.0.tgz",
@@ -26104,6 +26145,23 @@
"integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
"dev": true
},
+ "@ionic-native/core": {
+ "version": "5.36.0",
+ "resolved": "https://registry.npmjs.org/@ionic-native/core/-/core-5.36.0.tgz",
+ "integrity": "sha512-lOrkktadlKYbYf1LrDyAtsu1JnQ0oCCdkOU7iHQ8oXnNOkMwobFfD2m62F1CoOr0u9LIkpYnZSPjng8lZbmbNw==",
+ "peer": true,
+ "requires": {
+ "@types/cordova": "latest"
+ }
+ },
+ "@ionic-native/fingerprint-aio": {
+ "version": "5.36.0",
+ "resolved": "https://registry.npmjs.org/@ionic-native/fingerprint-aio/-/fingerprint-aio-5.36.0.tgz",
+ "integrity": "sha512-zd1PAfMsW4Inx/Vi399O29LWr9R1q0Gcj/2g86PZWSb0KnMG8dCoKoXKmkN3+HhajA/cdXaHEJWXbv+t6VlX8Q==",
+ "requires": {
+ "@types/cordova": "latest"
+ }
+ },
"@ionic/angular": {
"version": "6.0.9",
"resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-6.0.9.tgz",
@@ -31239,6 +31297,11 @@
}
}
},
+ "cordova-plugin-fingerprint-aio": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/cordova-plugin-fingerprint-aio/-/cordova-plugin-fingerprint-aio-5.0.1.tgz",
+ "integrity": "sha512-gZSBu7ZWmqy/Sf+LEnGv6/a5zLIZwijRsQ8nAxdlU94VHOyPB8yGTzSImBJvvShzr+BJ5GkJcv5iffUNpanXtQ=="
+ },
"core-js": {
"version": "3.19.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.19.0.tgz",
diff --git a/package.json b/package.json
index 70317e7..96aca45 100644
--- a/package.json
+++ b/package.json
@@ -33,8 +33,10 @@
"@capacitor/status-bar": "1.0.8",
"@datorama/akita": "^7.1.1",
"@datorama/akita-ngdevtools": "^7.0.0",
+ "@ionic-native/fingerprint-aio": "^5.36.0",
"@ionic/angular": "^6.0.0",
"chart.js": "^3.7.1",
+ "cordova-plugin-fingerprint-aio": "^5.0.1",
"rxjs": "~6.6.0",
"tslib": "^2.2.0",
"zone.js": "~0.11.4"
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index f1b9e79..a8211f2 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -1,8 +1,10 @@
+import { registerLocaleData } from '@angular/common';
import {
HttpClient,
HttpClientModule,
HTTP_INTERCEPTORS,
} from '@angular/common/http';
+import localeNL from '@angular/common/locales/nl';
import {
APP_INITIALIZER,
DEFAULT_CURRENCY_CODE,
@@ -12,6 +14,7 @@ import {
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { AkitaNgDevtools } from '@datorama/akita-ngdevtools';
+import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { EMPTY } from 'rxjs';
import { catchError, take, tap } from 'rxjs/operators';
@@ -23,8 +26,6 @@ import { AuthInterceptor } from './interceptor';
import { User } from './models';
import { UserStore } from './store/user';
import { API_ROOT_URL } from './tokens';
-import localeNL from '@angular/common/locales/nl';
-import { registerLocaleData } from '@angular/common';
registerLocaleData(localeNL, 'nl');
@@ -71,6 +72,7 @@ function getUser(http: HttpClient, userStore: UserStore) {
provide: LOCALE_ID,
useValue: 'nl',
},
+ FingerprintAIO,
{ provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' },
],
bootstrap: [AppComponent],
diff --git a/src/app/modules/tab2/tab2.page.html b/src/app/modules/tab2/tab2.page.html
index b30a63a..68d5ea4 100644
--- a/src/app/modules/tab2/tab2.page.html
+++ b/src/app/modules/tab2/tab2.page.html
@@ -23,4 +23,12 @@
5
2000
+
+
+ Check
+
+
+
+ Show
+
diff --git a/src/app/modules/tab2/tab2.page.ts b/src/app/modules/tab2/tab2.page.ts
index c033f7e..f209feb 100644
--- a/src/app/modules/tab2/tab2.page.ts
+++ b/src/app/modules/tab2/tab2.page.ts
@@ -3,6 +3,7 @@ import { IonRouterOutlet, ModalController } from '@ionic/angular';
import { ModalWithNavigationPage } from 'src/app/components/modal-with-navigation/modal-with-navigation.component';
import { ModalContentPage } from 'src/app/pages/modal-content/modal-content.page';
import { Haptics } from '@capacitor/haptics';
+import { FingerprintAIO } from '@ionic-native/fingerprint-aio/ngx';
@Component({
selector: 'app-tab2',
@@ -13,7 +14,7 @@ export class Tab2Page {
duration = 50;
constructor(
private modalController: ModalController,
- private routerOutlet: IonRouterOutlet
+ public faio: FingerprintAIO
) {}
async openModal() {
@@ -33,4 +34,33 @@ export class Tab2Page {
vibrateHard() {
Haptics.vibrate({ duration: 1000 });
}
+
+ check() {
+ console.log('check');
+ this.faio
+ .isAvailable()
+ .then((result) => {
+ console.log(result);
+ })
+ .catch((err) => {
+ console.log(err);
+ });
+ }
+
+ show() {
+ console.log('show');
+ this.faio
+ .show({
+ disableBackup: true, // Only for Android(optional)
+ fallbackButtonTitle: 'Use Pin', // Only for iOS
+ cancelButtonTitle: 'Cancel', // Only for iOS
+ title: 'FaceId Test',
+ })
+ .then((result) => {
+ console.log(result);
+ })
+ .catch((err) => {
+ console.log(err);
+ });
+ }
}
diff --git a/src/app/modules/tab4/tab4.page.html b/src/app/modules/tab4/tab4.page.html
index d8435ad..01c3222 100644
--- a/src/app/modules/tab4/tab4.page.html
+++ b/src/app/modules/tab4/tab4.page.html
@@ -1,4 +1,3 @@
-
-
+
\ No newline at end of file
diff --git a/src/app/modules/tab4/tab4.page.ts b/src/app/modules/tab4/tab4.page.ts
index 4749d59..8cc28f8 100644
--- a/src/app/modules/tab4/tab4.page.ts
+++ b/src/app/modules/tab4/tab4.page.ts
@@ -7,6 +7,7 @@ import {
} from '@angular/core';
import Chart from 'chart.js/auto';
+
@Component({
selector: 'app-tab4',
templateUrl: 'tab4.page.html',