Skip to content

chore: migrate to Swift Package Manager and drop the Firestore fork - #699

Open
demolaf wants to merge 3 commits into
mainfrom
chore/spm-migration
Open

demolaf wants to merge 3 commits into
mainfrom
chore/spm-migration

Conversation

@demolaf

@demolaf demolaf commented Sep 15, 2026

Copy link
Copy Markdown
Member

Both apps opted out of Swift Package Manager and pinned FirebaseFirestore to the invertase/firestore-ios-sdk-frameworks fork, a CocoaPods-only override that existed purely to avoid compiling Firestore's C++ from source. Upstream firebase-ios-sdk makes that redundant, shipping FirebaseFirestoreInternal as a precompiled binaryTarget over SPM, so the fork buys nothing and only adds the pin drift that broke CI in #692. SPM is also already enabledByDefault on Flutter stable, which now warns that opting out will stop being allowed.

This enables SPM for the tests app and the firebase_ui_auth example and deletes the override. With the last non-SPM plugins gone in #693 and #697, iOS drops CocoaPods entirely; macOS stays hybrid because facebook_auth_desktop still ships no Package.swift. Two problems surfaced only on a real build: firebase_database floated to 12.6.0, which pins firebase-ios-sdk exact: 12.19.0 against firebase_core's 12.18.0 and cannot resolve, and the Runner targets sat at iOS 13.0, below the 15.0 the Firebase packages require. The Flutter 3.44 UIScene changes are split into their own commit, since flutter build rewrites those files regardless and they are unrelated.

⚠️ Breaking change: the tests app and the firebase_ui_auth example now require iOS 15.0, up from 13.0, and macOS 12.0, up from 10.15. The iOS floor comes from the Firebase SPM packages; the macOS one from Xcode 26 and 27 refusing to build below 12.0, matching the bump #693 made to the firebase_ui_oauth example. No published firebase_ui_* package is affected.


Maintainer note: Fixes internal CPRN-453

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

Copy link
Copy Markdown

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 upgrades the google_sign_in dependency to version 7.1.0, which includes significant changes to the initialization and authentication flow. It introduces serverClientId support, updates the GoogleProvider to use the new authenticate method, and updates test suites to accommodate these changes. Additionally, it enables Swift Package Manager for iOS and macOS projects and updates the firebase_database dependency. I have no feedback to provide.

Flutter 3.44 rewrites these on any iOS build: plugin registration moves to FlutterImplicitEngineDelegate, Info.plist gains a UIApplicationSceneManifest, and the stale MinimumOSVersion key is dropped from AppFrameworkInfo.plist.

Unrelated to Swift Package Manager, split out so the SPM change reviews cleanly.
Enables SPM for the tests app and the firebase_ui_auth example, and removes the CocoaPods-only FirebaseFirestore fork override from both Podfiles. The fork existed only to avoid compiling Firestore's C++ from source, which upstream firebase-ios-sdk makes unnecessary: over SPM it ships FirebaseFirestoreInternal as a precompiled binaryTarget, alongside prebuilt grpc, absl and openssl_grpc. That also removes the pin-drift class behind CPRN-450.

With desktop_webview_auth and twitter_login gone in #693 and #697, every iOS plugin now supports SPM, so CocoaPods is fully deintegrated on iOS: Podfiles deleted, Pods build phases and xcconfig includes removed, and the Pods project dropped from the workspaces. macOS keeps CocoaPods, because facebook_auth_desktop (a transitive macOS-only implementation of flutter_facebook_auth) still ships no Package.swift, so that platform stays hybrid until it does.

Two fixes were needed for SPM to resolve and build. firebase_database floated to 12.6.0, whose Package.swift pins firebase-ios-sdk with exact: 12.19.0 while firebase_core pins exact: 12.18.0, which SPM cannot reconcile; it is now pinned to 12.5.0. CocoaPods never hit this because the podspecs read one version from firebase_core at pod-install time. The Runner targets also carried IPHONEOS_DEPLOYMENT_TARGET 13.0, below the 15.0 the Firebase packages require, which CocoaPods masked and SPM enforces on the app target.

The e2e caches now cover SPM's SourcePackages, with the macOS job still caching Pods alongside it. Their keys move off hashFiles('Podfile.lock') onto tests/pubspec.yaml, since Podfile.lock is gitignored and the old key was therefore constant, leaving restore-keys to do all the work. Package.resolved is gitignored alongside Podfile.lock to match the repo's lockfile convention, and the now-dead Firestore pin rewriter is removed from scripts/update_dependencies.dart.
@demolaf
demolaf force-pushed the chore/spm-migration branch from 439d87d to 252928a Compare September 17, 2026 13:53
@demolaf demolaf changed the title chore(tests): migrate to Swift Package Manager chore: migrate to Swift Package Manager and drop the Firestore fork Sep 17, 2026
@demolaf
demolaf marked this pull request as ready for review September 17, 2026 14:12
Xcode 26 and 27 reject anything below 12.0 outright, so the tests app and the firebase_ui_auth example could not be built for macOS at 10.15 on a current toolchain. This raises both, in the Xcode projects and the Podfiles, matching the bump #693 already applied to the firebase_ui_oauth example. The example's AppDelegate also picks up Xcode's modernisation, @NSApplicationMain to @main plus applicationSupportsSecureRestorableState.

CI has not hit this yet because the macos-15 runner still ships an older Xcode, so this is pre-emptive rather than a fix for a current failure.

⚠️ Breaking change: the tests app and the firebase_ui_auth example now require macOS 12.0, up from 10.15. No published firebase_ui_* package is affected.
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.

1 participant