diff --git a/FirebaseAuth/Sources/Swift/Backend/AuthRequestConfiguration.swift b/FirebaseAuth/Sources/Swift/Backend/AuthRequestConfiguration.swift index 9aa53d7e68f..47aff1be47e 100644 --- a/FirebaseAuth/Sources/Swift/Backend/AuthRequestConfiguration.swift +++ b/FirebaseAuth/Sources/Swift/Backend/AuthRequestConfiguration.swift @@ -19,7 +19,7 @@ import FirebaseCoreExtension /// Defines configurations to be added to a request to Firebase Auth's backend. @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) -class AuthRequestConfiguration: NSObject { +class AuthRequestConfiguration { /// The Firebase Auth API key used in the request. let apiKey: String diff --git a/FirebaseAuth/Sources/Swift/Backend/RPC/DeleteAccountResponse.swift b/FirebaseAuth/Sources/Swift/Backend/RPC/DeleteAccountResponse.swift index 92208e7581b..868d36d25d2 100644 --- a/FirebaseAuth/Sources/Swift/Backend/RPC/DeleteAccountResponse.swift +++ b/FirebaseAuth/Sources/Swift/Backend/RPC/DeleteAccountResponse.swift @@ -17,8 +17,8 @@ import Foundation /// Represents the response from the deleteAccount endpoint. /// /// See https://developers.google.com/identity/toolkit/web/reference/relyingparty/deleteAccount -class DeleteAccountResponse: NSObject, AuthRPCResponse { - override required init() {} +class DeleteAccountResponse: AuthRPCResponse { + required init() {} func setFields(dictionary: [String: AnyHashable]) throws {} } diff --git a/FirebaseAuth/Sources/Swift/Backend/RPC/EmailLinkSignInResponse.swift b/FirebaseAuth/Sources/Swift/Backend/RPC/EmailLinkSignInResponse.swift index 4147c4962e0..107c0859ac7 100644 --- a/FirebaseAuth/Sources/Swift/Backend/RPC/EmailLinkSignInResponse.swift +++ b/FirebaseAuth/Sources/Swift/Backend/RPC/EmailLinkSignInResponse.swift @@ -15,8 +15,8 @@ import Foundation /// Represents the response from the emailLinkSignin endpoint. -class EmailLinkSignInResponse: NSObject, AuthRPCResponse, AuthMFAResponse { - override required init() {} +class EmailLinkSignInResponse: AuthRPCResponse, AuthMFAResponse { + required init() {} /// The ID token in the email link sign-in response. private(set) var idToken: String? diff --git a/FirebaseAuth/Sources/Swift/Backend/RPC/GetAccountInfoResponse.swift b/FirebaseAuth/Sources/Swift/Backend/RPC/GetAccountInfoResponse.swift index 2f39fdfe68d..8b4ae17d627 100644 --- a/FirebaseAuth/Sources/Swift/Backend/RPC/GetAccountInfoResponse.swift +++ b/FirebaseAuth/Sources/Swift/Backend/RPC/GetAccountInfoResponse.swift @@ -19,7 +19,7 @@ private let kErrorKey = "error" /// Represents the provider user info part of the response from the getAccountInfo endpoint. /// See https://developers.google.com/identity/toolkit/web/reference/relyingparty/getAccountInfo -class GetAccountInfoResponseProviderUserInfo: NSObject { +class GetAccountInfoResponseProviderUserInfo { /// The ID of the identity provider. let providerID: String? @@ -57,7 +57,7 @@ class GetAccountInfoResponseProviderUserInfo: NSObject { /// Represents the firebase user info part of the response from the getAccountInfo endpoint. /// See https://developers.google.com/identity/toolkit/web/reference/relyingparty/getAccountInfo -class GetAccountInfoResponseUser: NSObject { +class GetAccountInfoResponseUser { /// The ID of the user. let localID: String? diff --git a/FirebaseAuth/Sources/Swift/Backend/RPC/SetAccountInfoResponse.swift b/FirebaseAuth/Sources/Swift/Backend/RPC/SetAccountInfoResponse.swift index d6bd97ccd70..4990e0dc0a0 100644 --- a/FirebaseAuth/Sources/Swift/Backend/RPC/SetAccountInfoResponse.swift +++ b/FirebaseAuth/Sources/Swift/Backend/RPC/SetAccountInfoResponse.swift @@ -16,7 +16,7 @@ import Foundation /// Represents the provider user info part of the response from the setAccountInfo endpoint. /// See https: // developers.google.com/identity/toolkit/web/reference/relyingparty/setAccountInfo -class SetAccountInfoResponseProviderUserInfo: NSObject { +class SetAccountInfoResponseProviderUserInfo { /// The ID of the identity provider. var providerID: String? diff --git a/FirebaseAuth/Sources/Swift/SystemService/AuthAPNSToken.swift b/FirebaseAuth/Sources/Swift/SystemService/AuthAPNSToken.swift index 5031a0e212e..3867f661e89 100644 --- a/FirebaseAuth/Sources/Swift/SystemService/AuthAPNSToken.swift +++ b/FirebaseAuth/Sources/Swift/SystemService/AuthAPNSToken.swift @@ -16,7 +16,7 @@ import Foundation /// A data structure for an APNs token. - class AuthAPNSToken: NSObject { + class AuthAPNSToken { let data: Data let type: AuthAPNSTokenType diff --git a/FirebaseAuth/Sources/Swift/SystemService/AuthAPNSTokenManager.swift b/FirebaseAuth/Sources/Swift/SystemService/AuthAPNSTokenManager.swift index 006efc5ddc1..ff677b8771b 100644 --- a/FirebaseAuth/Sources/Swift/SystemService/AuthAPNSTokenManager.swift +++ b/FirebaseAuth/Sources/Swift/SystemService/AuthAPNSTokenManager.swift @@ -31,7 +31,7 @@ /// A class to manage APNs token in memory. @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) - class AuthAPNSTokenManager: NSObject { + class AuthAPNSTokenManager { /// The timeout for registering for remote notification. /// /// Only tests should access this property. diff --git a/FirebaseAuth/Sources/Swift/SystemService/AuthAppCredential.swift b/FirebaseAuth/Sources/Swift/SystemService/AuthAppCredential.swift index 38fdcb06e34..39abc59e12f 100644 --- a/FirebaseAuth/Sources/Swift/SystemService/AuthAppCredential.swift +++ b/FirebaseAuth/Sources/Swift/SystemService/AuthAppCredential.swift @@ -15,7 +15,8 @@ import Foundation /// A class represents a credential that proves the identity of the app. -@objc(FIRAuthAppCredential) class AuthAppCredential: NSObject, NSSecureCoding { +@objc(FIRAuthAppCredential) // objc Needed for decoding old versions +class AuthAppCredential: NSObject, NSSecureCoding { /// The server acknowledgement of receiving client's claim of identity. var receipt: String diff --git a/FirebaseAuth/Sources/Swift/SystemService/AuthAppCredentialManager.swift b/FirebaseAuth/Sources/Swift/SystemService/AuthAppCredentialManager.swift index 511d354e2fd..0c83875a8d1 100644 --- a/FirebaseAuth/Sources/Swift/SystemService/AuthAppCredentialManager.swift +++ b/FirebaseAuth/Sources/Swift/SystemService/AuthAppCredentialManager.swift @@ -17,7 +17,7 @@ /// A class to manage app credentials backed by iOS Keychain. @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) - class AuthAppCredentialManager: NSObject { + class AuthAppCredentialManager { let kKeychainDataKey = "app_credentials" let kFullCredentialKey = "full_credential" let kPendingReceiptsKey = "pending_receipts" diff --git a/FirebaseAuth/Sources/Swift/SystemService/AuthNotificationManager.swift b/FirebaseAuth/Sources/Swift/SystemService/AuthNotificationManager.swift index 1d95153f42a..2cfd76ca2de 100644 --- a/FirebaseAuth/Sources/Swift/SystemService/AuthNotificationManager.swift +++ b/FirebaseAuth/Sources/Swift/SystemService/AuthNotificationManager.swift @@ -18,7 +18,7 @@ /// A class represents a credential that proves the identity of the app. @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) - class AuthNotificationManager: NSObject { + class AuthNotificationManager { /// The key to locate payload data in the remote notification. private let kNotificationDataKey = "com.google.firebase.auth" diff --git a/FirebaseAuth/Sources/Swift/Utilities/AuthErrorUtils.swift b/FirebaseAuth/Sources/Swift/Utilities/AuthErrorUtils.swift index dbf2dcb9a1b..6e6a1a74353 100644 --- a/FirebaseAuth/Sources/Swift/Utilities/AuthErrorUtils.swift +++ b/FirebaseAuth/Sources/Swift/Utilities/AuthErrorUtils.swift @@ -31,7 +31,7 @@ private let kFIRAuthErrorMessageMalformedJWT = "Failed to parse JWT. Check the userInfo dictionary for the full token." @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) -class AuthErrorUtils: NSObject { +class AuthErrorUtils { static let internalErrorDomain = "FIRAuthInternalErrorDomain" static let userInfoDeserializedResponseKey = "FIRAuthErrorUserInfoDeserializedResponseKey" static let userInfoDataKey = "FIRAuthErrorUserInfoDataKey" @@ -563,5 +563,3 @@ class AuthErrorUtils: NSObject { return error(code: .recaptchaActionCreationFailed, message: message) } } - -protocol MultiFactorResolverWrapper: NSObjectProtocol {} diff --git a/FirebaseAuth/Sources/Swift/Utilities/AuthWebUtils.swift b/FirebaseAuth/Sources/Swift/Utilities/AuthWebUtils.swift index e7c64d39d49..2231c040023 100644 --- a/FirebaseAuth/Sources/Swift/Utilities/AuthWebUtils.swift +++ b/FirebaseAuth/Sources/Swift/Utilities/AuthWebUtils.swift @@ -15,7 +15,7 @@ import Foundation @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *) -class AuthWebUtils: NSObject { +class AuthWebUtils { static func randomString(withLength length: Int) -> String { var randomString = "" for _ in 0 ..< length {