iOS中访问FaceID设置的偏好设置URL Scheme是什么?(对应TouchID路径)
FaceID & Passcode Settings URL Scheme Equivalent to TouchID
Great question! The equivalent URL Scheme to access FaceID settings (paired with passcode settings, just like the TouchID one you shared) uses FACEID_PASSCODE as the root parameter instead of TOUCHID_PASSCODE.
Here's the updated Swift code example that will take users directly to the FaceID & Passcode settings screen:
if let url = URL(string: "App-Prefs:root=FACEID_PASSCODE") { UIApplication.shared.open(url) }
Key Notes to Keep in Mind:
- This works starting with iOS 11 (the first version that introduced FaceID support).
- Apple doesn’t officially document these
App-PrefsURL schemes, so there’s a slight risk they could be modified or deprecated in future iOS releases. - While you don’t strictly need it just to open the settings page, if your app uses FaceID functionality directly, be sure to include the
NSFaceIDUsageDescriptionkey in yourInfo.plistwith a clear explanation of why you need it.
Quick recap: Your original TouchID code uses
TOUCHID_PASSCODE— swapping that value forFACEID_PASSCODEgives you the exact equivalent for FaceID settings.
内容的提问来源于stack exchange,提问作者multiholle




