diff --git a/Sources/Real/RealAuthorizationController.swift b/Sources/Real/RealAuthorizationController.swift index 545cfa6..40ae4f9 100644 --- a/Sources/Real/RealAuthorizationController.swift +++ b/Sources/Real/RealAuthorizationController.swift @@ -75,7 +75,7 @@ final public class RealAuthorizationController: AuthorizationControllerProtocol, @MainActor public func signalAllAcceptedCredentials(rpID: String, userHandle: Data, acceptedCredentialIDs: [Data]) async throws(AuthorizationError) { - if #available(iOS 26.0, *) { + if #available(iOS 26.0, macOS 26.0, *) { let credentialUpdater = ASCredentialUpdater() do { try await credentialUpdater.reportAllAcceptedPublicKeyCredentials( diff --git a/Sources/SimpleAuthenticationServices.swift b/Sources/SimpleAuthenticationServices.swift index 2bfec50..405c2aa 100644 --- a/Sources/SimpleAuthenticationServices.swift +++ b/Sources/SimpleAuthenticationServices.swift @@ -119,9 +119,17 @@ public enum AuthorizationErrorType: String, Equatable, Sendable, Codable { public struct AuthorizationError: Error, LocalizedError, Sendable { public let type: AuthorizationErrorType public let originalError: Error? - + public init(type: AuthorizationErrorType, originalError: Error? = nil) { self.type = type self.originalError = originalError } + + public var errorDescription: String? { + guard let originalError else { + return "AuthorizationError(type: \(type.rawValue))" + } + + return "AuthorizationError(type: \(type.rawValue), originalError: \(String(describing: originalError)))" + } }