本文整理汇总了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();
});
});