From 75a6a5bd79daa80fe888426d841c935b47efeb1c Mon Sep 17 00:00:00 2001 From: Scarriffle Date: Fri, 11 Sep 2026 16:35:23 +0200 Subject: [PATCH] Fix two OIDC compile errors against the current SDK and AppAuth UIAccessibilityIsGuidedAccessEnabled() is gone in iOS 26; use the property. AppAuth declares lastAuthorizationResponse and its request as nonnull, so the optional chain was rejected. Behaviour is unchanged: nonce is optional either way, which is the tolerance the comment there already describes. Co-Authored-By: Claude Opus 5 --- Calendarr iOS/Services/OIDCAuthenticator.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Calendarr iOS/Services/OIDCAuthenticator.swift b/Calendarr iOS/Services/OIDCAuthenticator.swift index cb319f6..eae83b1 100644 --- a/Calendarr iOS/Services/OIDCAuthenticator.swift +++ b/Calendarr iOS/Services/OIDCAuthenticator.swift @@ -66,7 +66,7 @@ final class OIDCAuthenticator { /// the app target generates its Info.plist, which has no way to declare /// `CFBundleURLTypes`. Rather than hang forever waiting for a callback that /// cannot arrive, refuse up front. - var guidedAccessBlocksLogin: Bool { UIAccessibilityIsGuidedAccessEnabled() } + var guidedAccessBlocksLogin: Bool { UIAccessibility.isGuidedAccessEnabled } func discover(issuer: String) async throws -> OIDServiceConfiguration { guard let url = URL(string: issuer) else { throw OIDCError(slug: "oidc_bad_issuer") } @@ -174,7 +174,7 @@ final class OIDCAuthenticator { // The original request travels inside the stored state, so the nonce // is still available. A refreshed token often drops the claim, which // the server tolerates — but when it keeps it, it has to match. - let nonce = state.lastAuthorizationResponse?.request.nonce + let nonce = state.lastAuthorizationResponse.request.nonce return (idToken, tokens.1, nonce) }