From 7658f467f39600235b8dce9fef40b89756eac57f Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 26 Apr 2025 19:14:05 +0100 Subject: [PATCH] Ensure nil callback is called on the main thread to fix Swift 6 crash --- Sources/AppAuthCore/OIDAuthState.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/AppAuthCore/OIDAuthState.m b/Sources/AppAuthCore/OIDAuthState.m index cb5a22a1e..8cc5cd9ef 100644 --- a/Sources/AppAuthCore/OIDAuthState.m +++ b/Sources/AppAuthCore/OIDAuthState.m @@ -165,7 +165,9 @@ @implementation OIDAuthState { callback(authState, authorizationError); } } else { - callback(nil, authorizationError); + dispatch_async(dispatch_get_main_queue(), ^{ + callback(nil, authorizationError); + }); } }]; return authFlowSession;