Skip to content

Commit 976393a

Browse files
authored
[Auth] Move applicable non-public types away from subclassing NSObject (#13676)
1 parent f390833 commit 976393a

12 files changed

+16
-17
lines changed

FirebaseAuth/Sources/Swift/Backend/AuthRequestConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import FirebaseCoreExtension
1919

2020
/// Defines configurations to be added to a request to Firebase Auth's backend.
2121
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
22-
class AuthRequestConfiguration: NSObject {
22+
class AuthRequestConfiguration {
2323
/// The Firebase Auth API key used in the request.
2424
let apiKey: String
2525

FirebaseAuth/Sources/Swift/Backend/RPC/DeleteAccountResponse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import Foundation
1717
/// Represents the response from the deleteAccount endpoint.
1818
///
1919
/// See https://developers.google.com/identity/toolkit/web/reference/relyingparty/deleteAccount
20-
class DeleteAccountResponse: NSObject, AuthRPCResponse {
21-
override required init() {}
20+
class DeleteAccountResponse: AuthRPCResponse {
21+
required init() {}
2222

2323
func setFields(dictionary: [String: AnyHashable]) throws {}
2424
}

FirebaseAuth/Sources/Swift/Backend/RPC/EmailLinkSignInResponse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import Foundation
1616

1717
/// Represents the response from the emailLinkSignin endpoint.
18-
class EmailLinkSignInResponse: NSObject, AuthRPCResponse, AuthMFAResponse {
19-
override required init() {}
18+
class EmailLinkSignInResponse: AuthRPCResponse, AuthMFAResponse {
19+
required init() {}
2020

2121
/// The ID token in the email link sign-in response.
2222
private(set) var idToken: String?

FirebaseAuth/Sources/Swift/Backend/RPC/GetAccountInfoResponse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ private let kErrorKey = "error"
1919

2020
/// Represents the provider user info part of the response from the getAccountInfo endpoint.
2121
/// See https://developers.google.com/identity/toolkit/web/reference/relyingparty/getAccountInfo
22-
class GetAccountInfoResponseProviderUserInfo: NSObject {
22+
class GetAccountInfoResponseProviderUserInfo {
2323
/// The ID of the identity provider.
2424
let providerID: String?
2525

@@ -57,7 +57,7 @@ class GetAccountInfoResponseProviderUserInfo: NSObject {
5757

5858
/// Represents the firebase user info part of the response from the getAccountInfo endpoint.
5959
/// See https://developers.google.com/identity/toolkit/web/reference/relyingparty/getAccountInfo
60-
class GetAccountInfoResponseUser: NSObject {
60+
class GetAccountInfoResponseUser {
6161
/// The ID of the user.
6262
let localID: String?
6363

FirebaseAuth/Sources/Swift/Backend/RPC/SetAccountInfoResponse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Foundation
1616

1717
/// Represents the provider user info part of the response from the setAccountInfo endpoint.
1818
/// See https: // developers.google.com/identity/toolkit/web/reference/relyingparty/setAccountInfo
19-
class SetAccountInfoResponseProviderUserInfo: NSObject {
19+
class SetAccountInfoResponseProviderUserInfo {
2020
/// The ID of the identity provider.
2121
var providerID: String?
2222

FirebaseAuth/Sources/Swift/SystemService/AuthAPNSToken.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import Foundation
1717

1818
/// A data structure for an APNs token.
19-
class AuthAPNSToken: NSObject {
19+
class AuthAPNSToken {
2020
let data: Data
2121
let type: AuthAPNSTokenType
2222

FirebaseAuth/Sources/Swift/SystemService/AuthAPNSTokenManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
/// A class to manage APNs token in memory.
3333
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
34-
class AuthAPNSTokenManager: NSObject {
34+
class AuthAPNSTokenManager {
3535
/// The timeout for registering for remote notification.
3636
///
3737
/// Only tests should access this property.

FirebaseAuth/Sources/Swift/SystemService/AuthAppCredential.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
import Foundation
1616

1717
/// A class represents a credential that proves the identity of the app.
18-
@objc(FIRAuthAppCredential) class AuthAppCredential: NSObject, NSSecureCoding {
18+
@objc(FIRAuthAppCredential) // objc Needed for decoding old versions
19+
class AuthAppCredential: NSObject, NSSecureCoding {
1920
/// The server acknowledgement of receiving client's claim of identity.
2021
var receipt: String
2122

FirebaseAuth/Sources/Swift/SystemService/AuthAppCredentialManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
/// A class to manage app credentials backed by iOS Keychain.
1919
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
20-
class AuthAppCredentialManager: NSObject {
20+
class AuthAppCredentialManager {
2121
let kKeychainDataKey = "app_credentials"
2222
let kFullCredentialKey = "full_credential"
2323
let kPendingReceiptsKey = "pending_receipts"

FirebaseAuth/Sources/Swift/SystemService/AuthNotificationManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/// A class represents a credential that proves the identity of the app.
2020
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
21-
class AuthNotificationManager: NSObject {
21+
class AuthNotificationManager {
2222
/// The key to locate payload data in the remote notification.
2323
private let kNotificationDataKey = "com.google.firebase.auth"
2424

0 commit comments

Comments
 (0)