Skip to content

LocalAuthentication macOS xcode16.0 b1

Rolf Bjarne Kvinge edited this page Jul 12, 2024 · 3 revisions

#LocalAuthentication.framework https://github.com/xamarin/xamarin-macios/pull/20891

diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LABiometryType.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LABiometryType.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LABiometryType.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LABiometryType.h	2024-05-30 04:00:00
@@ -0,0 +1,26 @@
+//
+//  Copyright © 2024 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <LocalAuthentication/LAPublicDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NS_ENUM(NSInteger, LABiometryType)
+{
+    /// The device does not support biometry.
+    LABiometryTypeNone API_AVAILABLE(macos(10.13.2), ios(11.2)) = kLABiometryTypeNone,
+    LABiometryNone API_DEPRECATED_WITH_REPLACEMENT("LABiometryTypeNone", macos(10.13, 10.13.2), ios(11.0, 11.2)) = LABiometryTypeNone,
+    
+    /// The device supports Touch ID.
+    LABiometryTypeTouchID = kLABiometryTypeTouchID,
+
+    /// The device supports Face ID.
+    LABiometryTypeFaceID API_AVAILABLE(macos(10.15)) = kLABiometryTypeFaceID,
+
+    /// The device supports Optic ID
+    LABiometryTypeOpticID API_AVAILABLE(visionos(1.0), ios(17.0), macos(14.0)) = kLABiometryTypeOpticID,
+} API_AVAILABLE(macos(10.13.2), ios(11.0), watchos(11.0), tvos(18.0), visionos(2.0));
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LACompanionType.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LACompanionType.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LACompanionType.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LACompanionType.h	2024-05-30 04:00:01
@@ -0,0 +1,19 @@
+//
+//  Copyright © 2024 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <LocalAuthentication/LAPublicDefines.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NS_ENUM(NSInteger, LACompanionType)
+{
+    /// Paired Apple Watch
+    LACompanionTypeWatch API_AVAILABLE(macos(15.0)) API_UNAVAILABLE(ios, watchos, tvos, visionos) = kLACompanionTypeWatch,
+    
+    /// Paired Mac
+    LACompanionTypeMac API_AVAILABLE(ios(18.0)) API_UNAVAILABLE(macos, watchos, tvos, visionos) = kLACompanionTypeMac,
+} API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0));
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAContext.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAContext.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAContext.h	2024-04-18 08:40:43
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAContext.h	2024-05-30 04:00:01
@@ -6,6 +6,8 @@
 //
 
 #import <Foundation/Foundation.h>
+#import <LocalAuthentication/LABiometryType.h>
+#import <LocalAuthentication/LADomainState.h>
 #import <LocalAuthentication/LAPublicDefines.h>
 
 NS_ASSUME_NONNULL_BEGIN
@@ -48,8 +50,16 @@
     ///
     ///             Watch authentication dialog looks and behaves similarly to the biometric variant. Users can
     ///             confirm authentication by double-clicking the side button on their watch.
-    LAPolicyDeviceOwnerAuthenticationWithWatch API_AVAILABLE(macos(10.15), macCatalyst(13.0)) API_UNAVAILABLE(ios, watchos, tvos) = kLAPolicyDeviceOwnerAuthenticationWithWatch,
+    LAPolicyDeviceOwnerAuthenticationWithWatch API_DEPRECATED_WITH_REPLACEMENT("LAPolicyDeviceOwnerAuthenticationWithCompanion", macos(10.15, 15.0), macCatalyst(13.0, 18.0)) API_UNAVAILABLE(ios, watchos, tvos) = kLAPolicyDeviceOwnerAuthenticationWithWatch,
     
+    /// Device owner will be authenticated by a companion device e.g. Watch, Mac, etc.
+    ///
+    /// @discussion Companion authentication is required. If no nearby paired companion device can be found,
+    ///             LAErrorCompanionNotAvailable is returned.
+    ///
+    ///             Users should follow instructions on the companion device to authenticate.
+    LAPolicyDeviceOwnerAuthenticationWithCompanion API_AVAILABLE(macos(15.0), macCatalyst(18.0), ios(18.0)) API_UNAVAILABLE(watchos, tvos, visionos) = kLAPolicyDeviceOwnerAuthenticationWithCompanion,
+
     /// Device owner will be authenticated by biometry or Watch.
     ///
     /// @discussion Watch or biometric authentication is required. If no nearby paired watch device can be found,
@@ -59,8 +69,18 @@
     ///             Watch authentication dialog looks and behaves similarly to biometric variant. When both
     ///             mechanisms are available, user is asked to use biometry and watch authentication will run in
     ///             parallel.
-    LAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch API_AVAILABLE(macos(10.15), macCatalyst(13.0)) API_UNAVAILABLE(ios, watchos, tvos) = kLAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch,
-    
+    LAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch API_DEPRECATED_WITH_REPLACEMENT("LAPolicyDeviceOwnerAuthenticationWithBiometricsOrCompanion", macos(10.15, 15.0), macCatalyst(13.0, 18.0)) API_UNAVAILABLE(ios, watchos, tvos) = kLAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch,
+
+    /// Device owner will be authenticated by biometry or a companion device e.g. Watch, Mac, etc.
+    ///
+    /// @discussion Companion or biometric authentication is required. If no nearby paired companion device can be found,
+    ///             it behaves as LAPolicyDeviceOwnerAuthenticationWithBiometrics. Similarly, if biometry is
+    ///             unavailable it behaves as LAPolicyDeviceOwnerAuthenticationWithCompanion.
+    ///
+    ///             When both mechanisms are available, user is asked to use biometry and companion authentication
+    ///             will run in parallel. Users should follow instructions on the companion device to authenticate.
+    LAPolicyDeviceOwnerAuthenticationWithBiometricsOrCompanion API_AVAILABLE(macos(15.0), macCatalyst(18.0), ios(18.0)) API_UNAVAILABLE(watchos, tvos, visionos) = kLAPolicyDeviceOwnerAuthenticationWithBiometricsOrCompanion,
+
     /// Device owner will be authenticated by device passcode. The authentication will also succeed if the wrist detection is enabled,
     /// correct passcode was entered in the past and the watch has been on the wrist ever since.
     LAPolicyDeviceOwnerAuthenticationWithWristDetection API_AVAILABLE(watchos(9.0)) API_UNAVAILABLE(macos, ios, tvos) = kLAPolicyDeviceOwnerAuthenticationWithWristDetection,
@@ -291,20 +311,6 @@
 ///             this property is left nil or is set to empty string.
 @property (nonatomic, nullable, copy) NSString *localizedCancelTitle API_AVAILABLE(macos(10.12), ios(10.0)) API_UNAVAILABLE(watchos, tvos);
 
-/// Contains policy domain state.
-///
-/// @discussion  This property is set only when evaluatePolicy is called and succesful Touch ID or Face ID authentication
-///              was performed, or when canEvaluatePolicy succeeds for a biometric policy.
-///              It stays nil for all other cases.
-///              If biometric database was modified (fingers or faces were removed or added), evaluatedPolicyDomainState
-///              data will change. Nature of such database changes cannot be determined
-///              but comparing data of evaluatedPolicyDomainState after different evaluatePolicy
-///              will reveal the fact database was changed between calls.
-///
-/// @warning Please note that the value returned by this property can change exceptionally between major OS versions even if
-///          the state of biometry has not changed.
-@property (nonatomic, nullable, readonly) NSData *evaluatedPolicyDomainState API_AVAILABLE(macos(10.11), ios(9.0)) API_UNAVAILABLE(watchos, tvos);
-
 /// Time interval for accepting a successful Touch ID or Face ID device unlock (on the lock screen) from the past.
 ///
 /// @discussion This property can be set with a time interval in seconds. If the device was successfully unlocked by
@@ -340,29 +346,26 @@
 ///             LAErrorNotInteractive instead of displaying the authentication UI.
 @property (nonatomic) BOOL interactionNotAllowed API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0)) API_UNAVAILABLE(tvos);
 
-
-typedef NS_ENUM(NSInteger, LABiometryType)
-{
-    /// The device does not support biometry.
-    LABiometryTypeNone API_AVAILABLE(macos(10.13.2), ios(11.2)) = kLABiometryTypeNone,
-    LABiometryNone API_DEPRECATED_WITH_REPLACEMENT("LABiometryTypeNone", macos(10.13, 10.13.2), ios(11.0, 11.2)) = LABiometryTypeNone,
-    
-    /// The device supports Touch ID.
-    LABiometryTypeTouchID = kLABiometryTypeTouchID,
-
-    /// The device supports Face ID.
-    LABiometryTypeFaceID API_AVAILABLE(macos(10.15)) = kLABiometryTypeFaceID,
-
-    /// The device supports Optic ID
-    LABiometryTypeOpticID API_AVAILABLE(visionos(1.0), ios(17.0), macos(14.0)) = kLABiometryTypeOpticID,
-} API_AVAILABLE(macos(10.13.2), ios(11.0)) API_UNAVAILABLE(watchos, tvos);
-
 /// Indicates the type of the biometry supported by the device.
+@property (nonatomic, readonly) LABiometryType biometryType API_AVAILABLE(macos(10.13.2), ios(11.0), watchos(11.0), tvos(18.0), visionos(2.0));
+
+/// Contains policy domain state.
 ///
-/// @discussion  This property is set when canEvaluatePolicy has been called for a biometric policy.
-///              The default value is LABiometryTypeNone.
-@property (nonatomic, readonly) LABiometryType biometryType API_AVAILABLE(macos(10.13.2), ios(11.0)) API_UNAVAILABLE(watchos, tvos);
+/// @discussion  This property is set only when evaluatePolicy is called and succesful Touch ID or Face ID authentication
+///              was performed, or when canEvaluatePolicy succeeds for a biometric policy.
+///              It stays nil for all other cases.
+///              If biometric database was modified (fingers or faces were removed or added), evaluatedPolicyDomainState
+///              data will change. Nature of such database changes cannot be determined
+///              but comparing data of evaluatedPolicyDomainState after different evaluatePolicy
+///              will reveal the fact database was changed between calls.
+///
+/// @warning Please note that the value returned by this property can change exceptionally between major OS versions even if
+///          the state of biometry has not changed.
+@property (nonatomic, nullable, readonly) NSData *evaluatedPolicyDomainState
+API_DEPRECATED_WITH_REPLACEMENT("domainState.biometry.stateHash", macos(10.11, 15.0), ios(9.0, 18.0)) API_UNAVAILABLE(watchos, tvos);
 
+/// Contains authentication domain state.
+@property (nonatomic, readonly) LADomainState *domainState API_AVAILABLE(macos(15.0), ios(18.0), visionos(2.0)) API_UNAVAILABLE(watchos, tvos);
 
 @end
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LADomainState.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LADomainState.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LADomainState.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LADomainState.h	2024-05-30 10:47:59
@@ -0,0 +1,95 @@
+//
+//  Copyright © 2024 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <LocalAuthentication/LABiometryType.h>
+#import <LocalAuthentication/LACompanionType.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(15.0), ios(18.0), visionos(2.0)) API_UNAVAILABLE(watchos, tvos)
+@interface LADomainStateBiometry : NSObject
+
+/// Indicates biometry type available on the device.
+@property (nonatomic, readonly) LABiometryType biometryType;
+
+/// Contains state hash data for the available biometry type. Returns `nil` if no biometry entities are enrolled.
+///
+/// @discussion  If biometric database was modified (fingers, faces were removed or added), `stateHash`
+///              data will change. Nature of such database changes cannot be determined
+///              but comparing data of `stateHash` after different evaluatePolicy calls
+///              will reveal the fact database was changed between the calls.
+///
+/// @warning Please note that the value returned by this property can change exceptionally between major OS versions even if
+///          the state of biometry has not changed.
+@property (nonatomic, readonly, nullable) NSData *stateHash;
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(watchos, tvos, visionos)
+@interface LADomainStateCompanion : NSObject
+
+/// Indicates types of companions paired with the device.
+/// The elements are NSNumber-wrapped instances of @c `LACompanionType`.
+@property (nonatomic, readonly) NSSet<NSNumber *> *availableCompanionTypes NS_REFINED_FOR_SWIFT;
+
+/// Contains combined state hash data for all available companion types. . Returns `nil` if no companion devices are paired.
+///
+/// @discussion  As long as database of paired companion devices doesn't change,
+///              `stateHash` stays the same for the same set of `availableCompanions`.
+///
+///              If database of paired companion devices was modified, `stateHash`
+///              data will change. Nature of such database changes cannot be determined
+///              but comparing data of `stateHash` after different policy evaluation
+///              will reveal the fact database was changed between calls.
+///
+///              If you are interested in a state hash for a specific companion type
+///              you can use `stateHashForCompanionType` method.
+///
+/// @warning Please note that the value returned by this property can change exceptionally between major OS versions even if
+///          the list of paired companions has not changed.
+@property (nonatomic, readonly, nullable) NSData *stateHash;
+
+/// Returns state hash data for the given companion type.
+///
+/// @discussion  If database of paired devices of the given type was modified state hash
+///              data will change. Nature of such database changes cannot be determined
+///              but comparing data of state hash after different policy evaluation
+///              will reveal the fact database was changed between calls.
+///
+/// @param companionType The companion type for which state hash data should be returned.
+- (NSData * _Nullable)stateHashForCompanionType:(LACompanionType)companionType NS_SWIFT_NAME(stateHash(for:));
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+API_AVAILABLE(macos(15.0), ios(18.0), visionos(2.0)) API_UNAVAILABLE(watchos, tvos)
+@interface LADomainState : NSObject
+
+/// Contains biometric domain state.
+@property (nonatomic, readonly) LADomainStateBiometry *biometry;
+
+/// Contains companion domain state.
+@property (nonatomic, readonly) LADomainStateCompanion *companion
+API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(watchos, tvos, visionos);
+
+/// Contains combined state hash data for biometry and companion state hashes.
+///
+/// @warning Please note that the value returned by this property can change exceptionally between major OS versions even if
+///          the list of paired companions has not changed.
+@property (nonatomic, readonly, nullable) NSData *stateHash;
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironment.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironment.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironment.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironment.h	2024-05-30 04:00:01
@@ -0,0 +1,49 @@
+//
+//  Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <LocalAuthentication/LAEnvironmentState.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol LAEnvironmentObserver;
+
+API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0))
+@interface LAEnvironment : NSObject
+
+/// The clients should use @c currentUser class property.
++ (instancetype)new NS_UNAVAILABLE;
+
+/// The clients should use  @c currentUser class property.
+- (instancetype)init NS_UNAVAILABLE;
+
+/// @brief Adds observer to monitor changes of the environment.
+/// @discussion The observer will be held weakly so its instance should be kept alive by the caller.
+- (void)addObserver:(id<LAEnvironmentObserver>)observer NS_SWIFT_NAME(addObserver(_:));
+
+/// @brief Removes the previously registered observer.
+/// @discussion If the observer is deallocated, it will be removed automatically.
+- (void)removeObserver:(id<LAEnvironmentObserver>)observer NS_SWIFT_NAME(removeObserver(_:));
+
+/// Environment of the current user.
+@property (nonatomic, readonly, class) LAEnvironment *currentUser;
+
+/// The environment state information.
+@property (nonatomic, readonly) LAEnvironmentState *state;
+
+@end
+
+API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0))
+NS_SWIFT_NAME(LAEnvironment.Observer)
+@protocol LAEnvironmentObserver<NSObject>
+@optional
+/// Called when there has been a change in the environment.
+/// @discussion Invoked on a queue private to LocalAuthentication framework. At the moment of invocation of this method,
+///             @c LAEnvironment.state already contains the new updated state.
+/// @param oldState The old environment state (before update)
+- (void)environment:(LAEnvironment *)environment stateDidChangeFromOldState:(LAEnvironmentState *)oldState;
+@end
+
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanism.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanism.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanism.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanism.h	2024-05-30 04:00:01
@@ -0,0 +1,33 @@
+//
+//  Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0))
+NS_SWIFT_NAME(LAEnvironment.Mechanism)
+NS_SWIFT_SENDABLE
+@interface LAEnvironmentMechanism : NSObject
+
+/// Clients should only consume environment mechanisms..
++ (instancetype)new NS_UNAVAILABLE;
+
+/// The Clients should only consume environment mechanisms..
+- (instancetype)init NS_UNAVAILABLE;
+
+/// @brief Whether the mechanism is available for use, i.e. whether the relevant preflight call of @c canEvaluatePolicy would succeed.
+/// @warning If @c isUsable reads @c NO, do not assume that it's because of some particular reason. You should check
+/// properties of the subclass to determine why mechanism can't be used.
+@property (nonatomic, readonly) BOOL isUsable;
+
+/// The localized name of the authentication mechanism, e.g. "Touch ID", "Face ID" etc.
+@property (nonatomic, readonly) NSString *localizedName;
+
+/// Name of the SF Symbol representing this authentication mechanism.
+@property (nonatomic, readonly) NSString *iconSystemName;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismBiometry.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismBiometry.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismBiometry.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismBiometry.h	2024-05-30 04:00:01
@@ -0,0 +1,48 @@
+//
+//  Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <LocalAuthentication/LAContext.h>
+#import <LocalAuthentication/LAEnvironmentMechanism.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+
+API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0))
+NS_SWIFT_NAME(LAEnvironment.MechanismBiometry)
+NS_SWIFT_SENDABLE
+@interface LAEnvironmentMechanismBiometry : LAEnvironmentMechanism
+
+/// @brief Type of biometry supported by the device.
+/// @discussion This property does not indicate whether biometry is available or not. It always reads the type of biometry
+///             supported by device hardware. You should check @c isUsable property to see if it is available for use.
+@property (nonatomic, readonly) LABiometryType biometryType;
+
+/// @brief Whether the user has enrolled this biometry.
+/// @discussion Even if biometry is enrolled, it does not necessarily mean that it can be used. You should check @c isUsable
+///             property to see if it is available for use.
+@property (nonatomic, readonly) BOOL isEnrolled;
+
+/// @brief Whether biometry is locked out.
+/// @discussion The system might lock the user out of biometry for various reasons. For example, with Face ID, the user is
+///             locked out after 5 failed match attempts in row. To recover from bio lockout, users need to enter their passcode
+///             (e.g. during device ulock).
+@property (nonatomic, readonly) BOOL isLockedOut;
+
+/// @brief The application specific state of the biometric enrollment as returned by @c LAContext.domainState.biometry.stateHash
+/// @discussion This value represents the state of the enrollment and changes whenever the biometric enrollment is changed.
+///             It does not directly map to the enrolled templates, e.g. if a finger is added to Touch ID enrollement and then
+///             removed, the final state would be different.
+///             It also returns different values to different apps to prevent tracking of user identity.
+@property (nonatomic, readonly) NSData *stateHash;
+
+/// @brief Whether the built in biometric sensor is inaccessible in the current configuration, preventing the use of biometry.
+/// @discussion Currently, the only example of this is a Clamshell Mode on macOS. The user will be not able to use Touch ID
+///             if the MacBook lid is closed while connected to external monitor and keyboard, unless the external keyboard
+///             has Touch ID.
+@property (nonatomic, readonly) BOOL builtInSensorInaccessible;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismCompanion.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismCompanion.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismCompanion.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismCompanion.h	2024-05-30 04:00:01
@@ -0,0 +1,27 @@
+//
+//  Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <LocalAuthentication/LAEnvironmentMechanism.h>
+#import <LocalAuthentication/LACompanionType.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0))
+NS_SWIFT_NAME(LAEnvironment.MechanismCompanion)
+NS_SWIFT_SENDABLE
+@interface LAEnvironmentMechanismCompanion : LAEnvironmentMechanism
+
+/// Type of the companion.
+@property (nonatomic, readonly) LACompanionType type;
+
+/// @brief Hash of the current companion pairing as returned by @c LAContext.domainState.companion.stateHash(for:)
+/// @discussion If no companion are paired for this companion type, @c stateHash property is @c nil.
+///             If at least one companion is paired for this companion type, @c stateHash is not @c nil and
+///             it changes whenever the set of paired companions of this type is changed.
+@property (nonatomic, readonly, nullable) NSData *stateHash;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismUserPassword.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismUserPassword.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismUserPassword.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentMechanismUserPassword.h	2024-05-30 04:00:01
@@ -0,0 +1,20 @@
+//
+//  Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <LocalAuthentication/LAEnvironmentMechanism.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0)) 
+NS_SWIFT_NAME(LAEnvironment.MechanismUserPassword)
+NS_SWIFT_SENDABLE
+@interface LAEnvironmentMechanismUserPassword : LAEnvironmentMechanism
+
+/// @brief Whether the local user password or passcode is set on this device.
+@property (nonatomic, readonly) BOOL isSet;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentState.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentState.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentState.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAEnvironmentState.h	2024-05-30 04:00:01
@@ -0,0 +1,49 @@
+//
+//  Copyright © 2023 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <LocalAuthentication/LAEnvironmentMechanism.h>
+#import <LocalAuthentication/LAEnvironmentMechanismBiometry.h>
+#import <LocalAuthentication/LAEnvironmentMechanismCompanion.h>
+#import <LocalAuthentication/LAEnvironmentMechanismUserPassword.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0), visionos(2.0))
+NS_SWIFT_NAME(LAEnvironment.State)
+NS_SWIFT_SENDABLE
+@interface LAEnvironmentState : NSObject<NSCopying>
+
+/// Clients shall not create environment state.
+- (instancetype)init NS_UNAVAILABLE;
+
+/// Clients shall not create environment state.
++ (instancetype)new NS_UNAVAILABLE;
+
+/// @brief Information about biometric authentication (Touch ID, Face ID or Optic ID).
+/// @discussion @c nil if biometry is not supported by this device.
+@property (nonatomic, readonly, nullable) LAEnvironmentMechanismBiometry *biometry;
+
+/// @brief Information about local user password (on macOS) or passcode (on embedded platforms).
+/// @discussion @c nil if user password or passcode is not supported by this device.
+@property (nonatomic, readonly, nullable) LAEnvironmentMechanismUserPassword *userPassword;
+
+/// @brief Companion authentication mechanisms.
+/// @discussion Companion mechanisms such as Apple Watch can appear and disappear as they get in and out of reach, but
+///             this property enumerates paired companions, even if they are not reachable at the moment. Check @c isUsable
+///             property to determine if a particular companion type is available for use. 
+///             Note that items in this array represent paired companion types, not individual devices. Therefore, even if the user
+///             has paired multiple Apple Watch devices for companion authentication, the array will contain only one
+///             @c LAEnvironmentMechanimsCompanion instance of type @c LACompanionTypeWatch.
+@property (nonatomic, readonly) NSArray<LAEnvironmentMechanismCompanion *> *companions
+API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(watchos, tvos, visionos);
+
+/// @brief Information about all authentication mechanisms.
+/// @discussion This property aggregates @c biometry, @c userPassword, @c companions and any future
+///             authentication mechanisms.
+@property (nonatomic, readonly) NSArray<LAEnvironmentMechanism *> *allMechanisms;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAError.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAError.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAError.h	2024-04-19 07:58:21
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAError.h	2024-05-30 10:47:59
@@ -64,8 +64,11 @@
     LAErrorNotInteractive API_AVAILABLE(macos(10.10), ios(8.0), watchos(3.0)) API_UNAVAILABLE(tvos) = kLAErrorNotInteractive,
     
     /// Authentication could not start because there was no paired watch device nearby.
-    LAErrorWatchNotAvailable API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, watchos, tvos) = kLAErrorWatchNotAvailable,
+    LAErrorWatchNotAvailable API_DEPRECATED_WITH_REPLACEMENT("LAErrorCompanionNotAvailable", macos(10.15, 15.0)) API_UNAVAILABLE(ios, watchos, tvos) = kLAErrorWatchNotAvailable,
     
+    /// Authentication could not start because there was no paired companion device nearby.
+    LAErrorCompanionNotAvailable API_AVAILABLE(macos(15.0), ios(18.0)) API_UNAVAILABLE(watchos, tvos, visionos) = kLAErrorCompanionNotAvailable,
+
     /// Authentication could not start because this device supports biometry only via removable accessories and no accessory has been paired.
     LAErrorBiometryNotPaired API_AVAILABLE(macos(11.2)) API_UNAVAILABLE(ios, watchos, tvos) = kLAErrorBiometryNotPaired,
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPublicDefines.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPublicDefines.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPublicDefines.h	2024-04-18 08:40:43
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LAPublicDefines.h	2024-05-30 04:00:00
@@ -14,6 +14,8 @@
 #define kLAPolicyDeviceOwnerAuthenticationWithWatch             3
 #define kLAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch 4
 #define kLAPolicyDeviceOwnerAuthenticationWithWristDetection    5
+#define kLAPolicyDeviceOwnerAuthenticationWithCompanion         kLAPolicyDeviceOwnerAuthenticationWithWatch
+#define kLAPolicyDeviceOwnerAuthenticationWithBiometricsOrCompanion kLAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch
 
 // Biometry types
 #define kLABiometryTypeNone           0
@@ -44,8 +46,13 @@
 #define kLAErrorBiometryNotPaired                         -12
 #define kLAErrorBiometryDisconnected                      -13
 #define kLAErrorInvalidDimensions                         -14
+#define kLAErrorCompanionNotAvailable                       kLAErrorWatchNotAvailable
 
 // Error domain
 #define kLAErrorDomain        "com.apple.LocalAuthentication"
+
+// Companion types
+#define kLACompanionTypeWatch           1 << 0
+#define kLACompanionTypeMac             1 << 1
 
 #endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LocalAuthentication.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LocalAuthentication.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LocalAuthentication.h	2024-04-18 08:40:43
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/LocalAuthentication.framework/Headers/LocalAuthentication.h	2024-05-30 04:00:00
@@ -3,7 +3,16 @@
 //
 
 #import <LocalAuthentication/LABase.h>
+#import <LocalAuthentication/LABiometryType.h>
+#import <LocalAuthentication/LACompanionType.h>
 #import <LocalAuthentication/LAContext.h>
+#import <LocalAuthentication/LADomainState.h>
+#import <LocalAuthentication/LAEnvironment.h>
+#import <LocalAuthentication/LAEnvironmentMechanism.h>
+#import <LocalAuthentication/LAEnvironmentMechanismBiometry.h>
+#import <LocalAuthentication/LAEnvironmentMechanismCompanion.h>
+#import <LocalAuthentication/LAEnvironmentMechanismUserPassword.h>
+#import <LocalAuthentication/LAEnvironmentState.h>
 #import <LocalAuthentication/LAError.h>
 #import <LocalAuthentication/LAPublicDefines.h>
 #import <LocalAuthentication/LAPersistedRight.h>
Clone this wiki locally