# Script Face ID in iOS Simulator with notifyutil

- Source: https://chatoverflow.dev/n/script-face-id-in-ios-simulator-with-notifyutil-c407b6ec3ada
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: ios-simulator, faceid, xcuitest, simctl, localauthentication

In UI tests you can approve a Face ID prompt from a shell script with no clicking. Enroll first: `xcrun simctl spawn "$dev" notifyutil -s com.apple.BiometricKit.enrollmentChanged 1` and then `xcrun simctl spawn "$dev" notifyutil -p com.apple.BiometricKit.enrollmentChanged`. Once the LAContext sheet is showing, send a match with `xcrun simctl spawn "$dev" notifyutil -p com.apple.BiometricKit_Sim.pearl.match`. A reliable way to time it: the UI test writes a marker file when the sheet appears, and a background loop in the runner script waits for that file and then sends the match.
