Skip to content

feat: enable Firebase 13 compatibility, remove unused dependency, and address build warnings - #1406

Open
ncooke3 wants to merge 5 commits into
mainfrom
nc.f13
Open

ncooke3 wants to merge 5 commits into
mainfrom
nc.f13

Conversation

@ncooke3

@ncooke3 ncooke3 commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

After merging, this would need a SPM-only v16.2.0 tag and release page creation.

Usefulness is blocked until GSI 10.1.0 that will include Firebase 13 compatibility: google/GoogleSignIn-iOS#626

CocoaPods should no longer be published in alignment with firebase-ios-sdk.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates dependency version ranges in Package.swift and Package.resolved, adds Sendable conformances to authentication context types, removes redundant await keywords and argument labels, and adds .macOS(.v12) to the supported platforms in Package.swift. Feedback on the changes highlights that declaring macOS support in Package.swift will cause compilation failures because several targets use iOS-only APIs without conditional compilation guards.

Comment thread Package.swift
Comment on lines +23 to +28
platforms: [
.iOS(.v17),
// Satisfies SPM's dependency graph check for FirebaseAuth 13 & GoogleSignIn 11.
// This package only supports iOS.
.macOS(.v12)
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Adding .macOS(.v12) to the supported platforms will cause compilation failures when building for macOS. Several targets in this package (such as FirebaseAuthSwiftUI, FirebaseGoogleSwiftUI, and FirebaseStorageUI) contain iOS-only APIs (like UIApplication, UIWindowScene, and UIImage) and do not have #if os(iOS) or #if canImport(UIKit) guards. If this package must declare macOS support to satisfy dependency graph checks, you will need to wrap all iOS-specific source files and APIs in #if os(iOS) guards to prevent compilation errors on macOS. Otherwise, it is highly recommended to revert this change and have consuming applications conditionally depend on this package only for their iOS targets.

  platforms: [.iOS(.v17)],

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

• SPM's Fallback Behavior: When a platform is omitted from platforms: [...] in Package.swift, SPM does not interpret it as "this platform is unsupported". Instead, it falls back to the default minimum
version for that platform based on your swift-tools-version. For tools 6.0, that default is macOS 10.13.
• Dependency Graph Floor Check: SPM enforces that a target's deployment target must be ≥ its dependencies' deployment targets across all platforms SPM thinks the target supports.
• GoogleSignIn requires macOS 12.0 (and FirebaseAuth requires macOS 11.0 in Firebase 13).
• Because FirebaseUI only listed .iOS(.v17), SPM assigned it the default macOS 10.13, saw 10.13 < 12.0, and failed graph validation before building.
• Declaring .macOS(.v12) explicitly raises SPM's macOS floor above GoogleSignIn's requirement so graph validation passes.

@ncooke3 ncooke3 Oct 9, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This library didn't work on macOS before this PR, so there's no difference in outcome.

_ = try await handleAutoUpgradeAnonymousUser(credentials: credential)
} else {
let result = try await auth.signIn(withEmail: email, link: link)
_ = try await auth.signIn(withEmail: email, link: link)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No action required, but maybe we could annotate these with allow-unused-result upstream.

@paulb777 paulb777 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-Up Note (Post-Firebase 13 / GSI 10.1.0 Release)

  • Once firebase-ios-sdk 13.0.0 and GoogleSignIn-iOS 10.1.0 are tagged, consider bumping at least one sample/test Xcode project (samples/swift/FirebaseUI-demo-swift.xcodeproj is currently upToNextMajorVersion from 12.14.0, and e2eTest/FirebaseSwiftUIExample.xcodeproj is upToNextMajorVersion from 11.12.0) and/or Package.resolved so CI builds and tests against Firebase 13 directly.

Comment thread Package.swift
platforms: [.iOS(.v17)],
platforms: [
.iOS(.v17),
// Satisfies SPM's dependency graph check for FirebaseAuth 13 & GoogleSignIn 11.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be GSI 10


private extension AuthService {
internal func updateAuthenticationState() {
extension AuthService {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the agent

Note (Verified Safe, Optional Cleanup): Checked all remaining properties and methods inside this extension AuthService block (lines 918–1190) — every one explicitly declares private, so removing private from extension does not accidentally expose any private helper as internal. However, moving func updateAuthenticationState() out above private extension AuthService would keep private extension AuthService intact so any future helper added under // MARK: - Private Helper Methods stays private by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants