ios - 在模拟器上使用 Touch ID

标签 ios ionic2 emulation touch-id

我正在尝试在我的 Ionic 2 应用程序中使用 TouchID。我有一个 iphone 5c,所以我无法在真实设备上进行测试。

我导入了包:

import { TouchID } from 'ionic-native';

然后,我测试了第一个功能(我已经在模拟器的硬件部分激活了touchID):

TouchID.isAvailable()
.then(
  res => console.log('TouchID is available!'),
  err => console.error('TouchID is not available', err)
);

一切正常。现在我想做的是测试这个功能:

TouchID.verifyFingerprint('Scan your fingerprint please')
.then(
  res => console.log('Ok', res),
  err => console.error('Error', err)
);

可以在模拟器上测试吗? 模拟器可以监听指纹 Action 吗?

最佳答案

是的,这是可能的!

打开模拟器,点击 Hardware -> Touch ID Enrolled 激活 Touch ID

Touch ID Enrolled

要测试 Touch ID,您可以进入硬件 -> 模拟手指触摸 -> 匹配或不匹配

Simulate Finger Touch

关于ios - 在模拟器上使用 Touch ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41741640/

相关文章:

ios - 通过 iPhone App 连接到特殊的 Wi-Fi 网络

安卓工作室 : Can't run AVD because of Intel HAXM error

ios - 在初始加载时删除 UITableViewCell 的右侧阴影

ios - 如何在 swift 3 中使用 Alamofire 制作并发送字典数组(JSON 格式)发送到服务器

angular - 将数据从子组件传递到父组件

angular - 在 Ionic 2 App 中打字找不到提供者

Android 模拟器在 Linux 上超慢

java - 我的 Android 应用程序在模拟器上运行但无法在我的 Android 设备上运行

ios - 离屏时 Nil out NSFetchedResultsController Delegate?

android - cordova 启动我的应用程序时出错