The patch component in `swift-tools-version:6.2.1` has no effect on
the available PackageDescription APIs, which are versioned by
major.minor only. The actual minimum (Xcode 26.2 / Swift 6.2.3) is
enforced by the `#if compiler(<6.2.3)` check in Package.swift.
Using 6.2 also lets Swift 6.2.0 toolchains load the manifest and
reach that check's descriptive error, instead of failing early with a
generic tools-version mismatch.
Update swift-tools-version to 6.2.1 in Package.swift and add a
build-time compiler check requiring Swift 6.2.3 or higher.
Xcode 26.2 is the minimum supported version for the SDK and ships with
the Swift 6.2.3 compiler. However, Xcode 26.2 bundles SwiftPM 6.2.1 in
SwiftPM.framework (used by Xcode and xcodebuild) while its toolchain
CLI reports 6.2.3. Declaring swift-tools-version 6.2.3 causes manifest
resolution to fail in Xcode 26.2 and xcodebuild because SwiftPM
validates the manifest version against the framework version.
To maintain Xcode 26.2 compatibility while enforcing the minimum
toolchain requirement:
- Bump swift-tools-version from 6.1 to 6.2.1 so Xcode 26.2 can resolve
the package.
- Add an #if compiler(<6.2.3) guard to Package.swift to emit an
actionable error on older compilers.
Add support for Swift Package Traits (SE-0450) in Package.swift by
introducing a default-enabled "Firestore" trait.
Previously, depending on the firebase-ios-sdk Swift package resolved
and downloaded Cloud Firestore and its heavy underlying dependencies
(gRPC, Abseil, and prebuilt binary artifacts), even if an application
only used lightweight Firebase products (such as Auth, Crashlytics, or
Remote Config).
With package traits, developers can now opt out of Cloud Firestore in
their Package.swift (via `traits: []`) or through Xcode 26.4+'s Package
Dependencies UI, pruning heavy dependencies and speeding up package
resolution while preserving full backwards compatibility:
- Define the "Firestore" trait in Package.swift, enabled by default in
`packageTraits`.
- Gate source and binary Firestore target dependencies (abseil, gRPC,
FirebaseFirestoreInternalWrapper, FirebaseFirestoreCombineSwift) on
`.when(traits: ["Firestore"])`.
- Add `FIRESTORE_TRAIT_ENABLED` C preprocessor macro via target cSettings
on `FirebaseFirestoreTarget` and `objc-import-test` to enable
conditional compilation for Clang targets when the trait is active.
- Provide a clear compile-time `#error` diagnostic in `dummy.m` if an app
target links Firestore without enabling the trait.
- Gate conditional imports in integration test targets (`swift-test` and
`objc-import-test`) so test suites pass both with default traits and
with `--disable-default-traits`.
- Opt out of default traits in `FirebaseAITestApp` (in project.pbxproj),
validating Xcode trait opt-out and avoiding Firestore dependencies for
AI Logic integration tests.
- Add release notes and Xcode opt-out instructions to changelogs in
`FirebaseCore/CHANGELOG.md` and `Firestore/CHANGELOG.md`.