From 537165b40cfafa369dac27474f9ddef572232594 Mon Sep 17 00:00:00 2001 From: Fredrik Johansson Date: Wed, 25 Mar 2026 15:13:16 +0100 Subject: [PATCH 1/2] fix(ios): qualify enum cases for newer Swift compilers --- ios/NativeBridge.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/NativeBridge.swift b/ios/NativeBridge.swift index 01968069..ea30ce2b 100644 --- a/ios/NativeBridge.swift +++ b/ios/NativeBridge.swift @@ -471,7 +471,7 @@ extension WebAuthError { case .noAuthorizationCode: code = "NO_AUTHORIZATION_CODE" case .pkceNotAllowed: code = "PKCE_NOT_ALLOWED" case .idTokenValidationFailed: code = "ID_TOKEN_VALIDATION_FAILED" - case .other: if let cause = self.cause as? AuthenticationError { + case WebAuthError.other: if let cause = self.cause as? AuthenticationError { code = cause.code } else { code = "OTHER" @@ -490,8 +490,8 @@ extension DPoPError { case .keychainOperationFailed: code = NativeBridge.dpopKeyStorageFailedCode case .cryptoKitOperationFailed: code = NativeBridge.dpopProofFailedCode case .secKeyOperationFailed: code = NativeBridge.dpopProofFailedCode - case .other: code = NativeBridge.dpopErrorCode - case .unknown: code = NativeBridge.dpopErrorCode + case DPoPError.other: code = NativeBridge.dpopErrorCode + case DPoPError.unknown: code = NativeBridge.dpopErrorCode default: code = NativeBridge.dpopErrorCode } From c8910d4bfc593f00228308917553ece9910c8bf4 Mon Sep 17 00:00:00 2001 From: Fredrik Johansson Date: Thu, 26 Mar 2026 22:26:36 +0100 Subject: [PATCH 2/2] fix(ios): qualify enum cases in error handling for Swift compatibility --- ios/NativeBridge.swift | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ios/NativeBridge.swift b/ios/NativeBridge.swift index ea30ce2b..bcc39f24 100644 --- a/ios/NativeBridge.swift +++ b/ios/NativeBridge.swift @@ -464,13 +464,13 @@ extension WebAuthError { func reactNativeErrorCode() -> String { var code: String switch self { - case .noBundleIdentifier: code = "NO_BUNDLE_IDENTIFIER" - case .transactionActiveAlready: code = "TRANSACTION_ACTIVE_ALREADY" - case .invalidInvitationURL: code = "INVALID_INVITATION_URL" - case .userCancelled: code = "USER_CANCELLED" - case .noAuthorizationCode: code = "NO_AUTHORIZATION_CODE" - case .pkceNotAllowed: code = "PKCE_NOT_ALLOWED" - case .idTokenValidationFailed: code = "ID_TOKEN_VALIDATION_FAILED" + case WebAuthError.noBundleIdentifier: code = "NO_BUNDLE_IDENTIFIER" + case WebAuthError.transactionActiveAlready: code = "TRANSACTION_ACTIVE_ALREADY" + case WebAuthError.invalidInvitationURL: code = "INVALID_INVITATION_URL" + case WebAuthError.userCancelled: code = "USER_CANCELLED" + case WebAuthError.noAuthorizationCode: code = "NO_AUTHORIZATION_CODE" + case WebAuthError.pkceNotAllowed: code = "PKCE_NOT_ALLOWED" + case WebAuthError.idTokenValidationFailed: code = "ID_TOKEN_VALIDATION_FAILED" case WebAuthError.other: if let cause = self.cause as? AuthenticationError { code = cause.code } else { @@ -486,10 +486,10 @@ extension DPoPError { func reactNativeErrorCode() -> String { var code: String switch self { - case .secureEnclaveOperationFailed: code = NativeBridge.dpopKeyGenerationFailedCode - case .keychainOperationFailed: code = NativeBridge.dpopKeyStorageFailedCode - case .cryptoKitOperationFailed: code = NativeBridge.dpopProofFailedCode - case .secKeyOperationFailed: code = NativeBridge.dpopProofFailedCode + case DPoPError.secureEnclaveOperationFailed: code = NativeBridge.dpopKeyGenerationFailedCode + case DPoPError.keychainOperationFailed: code = NativeBridge.dpopKeyStorageFailedCode + case DPoPError.cryptoKitOperationFailed: code = NativeBridge.dpopProofFailedCode + case DPoPError.secKeyOperationFailed: code = NativeBridge.dpopProofFailedCode case DPoPError.other: code = NativeBridge.dpopErrorCode case DPoPError.unknown: code = NativeBridge.dpopErrorCode default: