anchor
: The window anchor where passkey authentication UI will be presented. This is typically the main window of your application and should be of typeASPresentationAnchor
(which UIWindow conforms to).
- Requires iOS 16.0 or later
- Part of the native passkey implementation in iOS
- Must be called before using passkey backup or recovery methods
- Should be used in conjunction with
setPasskeyConfiguration
for complete setup - The anchor is used to present the system’s native passkey authentication dialog
- Ensure you’re running on iOS 16 or later
- Call
setPasskeyConfiguration
first to set up basic passkey settings - Obtain a reference to your app’s main window or appropriate presentation context
- Call this method with the window reference
- Now you can use passkey-based authentication features
- The passkey dialog will be presented as a system modal over your application
- The presentation anchor should be stable and available throughout the authentication process
- For best user experience, call this method when your view hierarchy is fully established