Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Jul 13, 2024
1 parent 7b2ae6b commit 744059b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion FirebaseAuth/Sources/Swift/Auth/Auth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ extension Auth: AuthInterop {
autoRefreshTokens = true
scheduleAutoTokenRefresh()

#if os(iOS) || os(tvOS) // TODO(ObjC): Is a similar mechanism needed on macOS?
#if canImport(UIKit) // Is a similar mechanism needed on macOS?
applicationDidBecomeActiveObserver =
NotificationCenter.default.addObserver(
forName: UIApplication.didBecomeActiveNotification,
Expand Down
4 changes: 2 additions & 2 deletions FirebaseAuth/Sources/Swift/Auth/AuthWorker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Foundation
@_implementationOnly import GoogleUtilities_Environment
#endif

#if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst)
#if canImport(UIKit)
import UIKit
#endif

Expand Down Expand Up @@ -277,7 +277,7 @@ actor AuthWorker {
}
}
} catch {
#if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst)
#if canImport(UIKit)
if (error as NSError).code == AuthErrorCode.keychainError.rawValue {
// If there's a keychain error, assume it is due to the keychain being accessed
// before the device is unlocked as a result of prewarming, and listen for the
Expand Down
11 changes: 0 additions & 11 deletions FirebaseAuth/Tests/Unit/AuthTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,6 @@ class AuthTests: RPCBaseTests {
app: FirebaseApp.app(name: name)!,
keychainStorageProvider: keychainStorageProvider
)

// Wait until Auth initialization completes
waitForAuthGlobalWorkQueueDrain()
}

private func waitForAuthGlobalWorkQueueDrain() {
let workerSemaphore = DispatchSemaphore(value: 0)
kAuthGlobalWorkQueue.async {
workerSemaphore.signal()
}
_ = workerSemaphore.wait(timeout: DispatchTime.distantFuture)
}

/** @fn testFetchSignInMethodsForEmailSuccess
Expand Down

0 comments on commit 744059b

Please sign in to comment.