本文整理匯總了TypeScript中@ionic-native/touch-id.TouchID類的典型用法代碼示例。如果您正苦於以下問題:TypeScript TouchID類的具體用法?TypeScript TouchID怎麽用?TypeScript TouchID使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TouchID類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: Promise
return new Promise((resolve, reject) => {
this.touchId.verifyFingerprint('Scan your fingerprint please')
.then(
res => resolve(),
err => reject()
);
});
示例2: verifyIOSFingerprint
private verifyIOSFingerprint(): Promise<any> {
return this.touchId
.verifyFingerprint('Scan your fingerprint please')
.catch(err => {
if (err && (err.code == -2 || err.code == -128))
err.message = TouchIdErrors.fingerprintCancelled;
throw err;
});
}
示例3: Promise
return new Promise(resolve => {
this.touchId.isAvailable().then(
() => {
return resolve(true);
},
() => {
this.logger.debug('Fingerprint is not available');
return resolve(false);
}
);
});
示例4: then
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.overlaysWebView(false);
statusBar.isVisible = false;
touchId.isAvailable().
then(x => {
this.touchIdService.init(this.nav);
this.touchIdService.attemptTouchId();
});
});