I want to enroll Touch ID in the iOS Simulator from the command line so I can run some automated UI feature tests around authorization.
I've tried a few things that didn't work:
xcrun simctl
doesn't have a Touch ID optionosascript
doesn't have accessibility permissions (and I don't like this invasive workaround)If it matters, I'm using Frank and Cucumber for the tests.
xcrun simctl spawn 'iPhone X' notifyutil -s com.apple.BiometricKit.enrollmentChanged '1' && xcrun simctl spawn 'iPhone X' notifyutil -p com.apple.BiometricKit.enrollmentChanged
This will enroll fingerprint. Code taken from here
Edit: You can use this for finger touch:
xcrun simctl spawn 'iPhone X' notifyutil -p com.apple.BiometricKit_Sim.fingerTouch.match
xcrun simctl spawn 'iPhone X' notifyutil -p com.apple.BiometricKit_Sim.fingerTouch.nomatch