From 5184d5facc7a65ac63dcbbc4235ccef040b09e8d Mon Sep 17 00:00:00 2001 From: Camden King Date: Wed, 6 Aug 2025 11:18:40 -0700 Subject: [PATCH 1/2] add swift 6 support initial commit --- .../Sources/KeychainStore/GTMOAuth2Compatibility.swift | 6 +++--- GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift | 4 ++-- Package.swift | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/GTMAppAuth/Sources/KeychainStore/GTMOAuth2Compatibility.swift b/GTMAppAuth/Sources/KeychainStore/GTMOAuth2Compatibility.swift index 4c02b527..0dfda78c 100644 --- a/GTMAppAuth/Sources/KeychainStore/GTMOAuth2Compatibility.swift +++ b/GTMAppAuth/Sources/KeychainStore/GTMOAuth2Compatibility.swift @@ -108,10 +108,10 @@ public final class GTMOAuth2Compatibility: NSObject { return originalString.addingPercentEncoding(withAllowedCharacters: urlQueryCharacters) } - private static var googleAuthorizationURL = URL(string: "https://accounts.google.com/o/oauth2/v2/auth")! + private static let googleAuthorizationURL = URL(string: "https://accounts.google.com/o/oauth2/v2/auth")! static let googleTokenURL = URL(string: "https://www.googleapis.com/oauth2/v4/token")! - static var googleRevocationURL = URL(string: "https://accounts.google.com/o/oauth2/revoke")! - static var googleUserInfoURL = URL(string: "https://www.googleapis.com/oauth2/v3/userinfo")! + static let googleRevocationURL = URL(string: "https://accounts.google.com/o/oauth2/revoke")! + static let googleUserInfoURL = URL(string: "https://www.googleapis.com/oauth2/v3/userinfo")! static var nativeClientRedirectURI: String { return oobString } diff --git a/GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift b/GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift index ff01f75e..bd39963a 100644 --- a/GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift +++ b/GTMAppAuth/Sources/KeychainStore/KeychainAttribute.swift @@ -18,9 +18,9 @@ import Foundation /// The Keychain attribute used to configure the way the keychain stores your items. @objc(GTMKeychainAttribute) -public final class KeychainAttribute: NSObject { +public final class KeychainAttribute: NSObject, Sendable { /// An enumeratiion listing the various attributes used to configure the Keychain. - public enum Attribute { + public enum Attribute: Sendable { /// Indicates whether to use the legacy file-based keychain on macOS. /// /// This attribute will set `kSecUseDataProtectionKeychain` as `false` in the Keychain query. diff --git a/Package.swift b/Package.swift index 6ea0c19d..507c0282 100644 --- a/Package.swift +++ b/Package.swift @@ -73,5 +73,6 @@ let package = Package( ], path: "GTMAppAuth/Tests/ObjCIntegration" ) - ] + ], + swiftLanguageVersions: [.version("6")] ) From a00ce78eab04d586ab8485c7279c819150d0fd32 Mon Sep 17 00:00:00 2001 From: Camden King Date: Wed, 6 Aug 2025 11:32:46 -0700 Subject: [PATCH 2/2] don't set swift version --- Package.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 507c0282..6ea0c19d 100644 --- a/Package.swift +++ b/Package.swift @@ -73,6 +73,5 @@ let package = Package( ], path: "GTMAppAuth/Tests/ObjCIntegration" ) - ], - swiftLanguageVersions: [.version("6")] + ] )