Skip to content

Commit aca14ea

Browse files
authored
fix(apple): build on Firebase Apple SDK 13 and require macOS 11 for Swift packages (#18783)
* fix(apple): compile Firestore pipelines and ML Model Downloader on SDK 13 Firestore 13 prefixes the pipeline bridge classes, and the Swift package no longer ships FirebaseMLModelDownloader. * fix(firestore): keep pipeline bridges compiling on CocoaPods 12.19.0 SDK 13 prefixes the bridge classes, and the same parser is still built against the unprefixed 12.19.0 names. * style(apple): format the SDK 13 pipeline parser and model downloader clang-format and swift-format reindent the bridge rename and the canImport guard. * refactor(apple)!: require macOS 11 for the Swift packages on SDK 13 Firebase Apple SDK 13 requires macOS 11. CocoaPods stays on 10.15 because that path is still SDK 12.19.0. * ci(auth): run iOS e2e on CocoaPods until GoogleSignIn supports App Check 12 Firebase Apple SDK 13 requires app-check 12 under Swift Package Manager, and every GoogleSignIn-iOS release still requires app-check 11, so the auth example cannot resolve its packages under SPM.
1 parent dbf7f75 commit aca14ea

22 files changed

Lines changed: 442 additions & 372 deletions

File tree

‎.github/workflows/e2e_tests_auth.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ jobs:
8686
# FIRInstallations aborts on at launch.
8787
native-config-args: '--live-tier-plist=auth'
8888
inject-config-secrets: true
89+
# Firebase Apple SDK 13 needs app-check 12, and every GoogleSignIn-iOS
90+
# release (8.0.0 to 10.0.0) needs app-check 11, so the example's
91+
# google_sign_in cannot resolve under SPM. CocoaPods is still on 12.19.0.
92+
# Rejoin SPM once https://github.com/google/GoogleSignIn-iOS/pull/626
93+
# ships and google_sign_in_ios accepts that release.
94+
ios-spm: false
8995
nightly_test_mode: ${{ inputs.nightly_test_mode == true }}
9096
secrets:
9197
TESTS_E2E_FIREBASE_OPTIONS_DART: ${{ secrets.TESTS_E2E_FIREBASE_OPTIONS_DART }}

‎.github/workflows/e2e_tests_functions.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
# 26.2 pin (see `reusable_e2e_ios.yaml`) is the likely fix, but one
7373
# variable at a time - these two rejoin SPM once the default-Xcode runs
7474
# prove clean. iOS SPM coverage is unaffected meanwhile: storage,
75-
# database, firestore and auth still build under it.
75+
# database and firestore still build under it.
7676
ios-spm: false
7777
native-config-args: '--functions-native'
7878
nightly_test_mode: ${{ inputs.nightly_test_mode == true }}

‎.github/workflows/e2e_tests_ml_model_downloader.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ jobs:
8181
native-config-args: '--live-tier-plist=ml_model_downloader'
8282
inject-config-secrets: true
8383
use-firebase-emulators: false
84+
# Firebase Apple SDK 13 removed FirebaseMLModelDownloader. Live tests stay
85+
# on CocoaPods, which is still pinned to 12.19.0.
86+
ios-spm: false
8487
nightly_test_mode: ${{ inputs.nightly_test_mode == true }}
8588
secrets:
8689
TESTS_E2E_FIREBASE_OPTIONS_DART: ${{ secrets.TESTS_E2E_FIREBASE_OPTIONS_DART }}

‎.github/workflows/e2e_tests_performance.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
# 26.2 pin (see `reusable_e2e_ios.yaml`) is the likely fix, but one
8686
# variable at a time - these two rejoin SPM once the default-Xcode runs
8787
# prove clean. iOS SPM coverage is unaffected meanwhile: storage,
88-
# database, firestore and auth still build under it.
88+
# database and firestore still build under it.
8989
ios-spm: false
9090
native-config-args: '--live-tier-plist=performance'
9191
inject-config-secrets: true

‎packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Package.swift‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ let package = Package(
3939
.headerSearchPath("include/cloud_firestore/Public"),
4040
.define("LIBRARY_VERSION", to: "\"\(libraryVersion)\""),
4141
.define("LIBRARY_NAME", to: "\"flutter-fire-fst\""),
42+
.define("FLT_FIREBASE_SDK_13"),
4243
]
4344
)
4445
]

‎packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTPipelineParser.m‎

Lines changed: 274 additions & 233 deletions
Large diffs are not rendered by default.

‎packages/cloud_firestore/cloud_firestore/macos/cloud_firestore/Package.swift‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let firebaseSdkVersion: Version = "13.0.0"
1313
let package = Package(
1414
name: "cloud_firestore",
1515
platforms: [
16-
.macOS("10.15")
16+
.macOS("11.0")
1717
],
1818
products: [
1919
.library(name: "cloud-firestore", targets: ["cloud_firestore"])
@@ -39,6 +39,7 @@ let package = Package(
3939
.headerSearchPath("include/cloud_firestore/Public"),
4040
.define("LIBRARY_VERSION", to: "\"\(libraryVersion)\""),
4141
.define("LIBRARY_NAME", to: "\"flutter-fire-fst\""),
42+
.define("FLT_FIREBASE_SDK_13"),
4243
]
4344
)
4445
]

‎packages/cloud_functions/cloud_functions/macos/cloud_functions/Package.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let firebaseSdkVersion: Version = "13.0.0"
1212
let package = Package(
1313
name: "cloud_functions",
1414
platforms: [
15-
.macOS("10.15")
15+
.macOS("11.0")
1616
],
1717
products: [
1818
.library(name: "cloud-functions", targets: ["cloud_functions"])

‎packages/firebase_ai/firebase_ai/macos/firebase_ai/Package.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import PackageDescription
1010
let package = Package(
1111
name: "firebase_ai",
1212
platforms: [
13-
.macOS("10.15")
13+
.macOS("11.0")
1414
],
1515
products: [
1616
.library(name: "firebase-ai", targets: ["firebase_ai"])

‎packages/firebase_analytics/firebase_analytics/macos/firebase_analytics/Package.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let firebaseSdkVersion: Version = "13.0.0"
1212
let package = Package(
1313
name: "firebase_analytics",
1414
platforms: [
15-
.macOS("10.15")
15+
.macOS("11.0")
1616
],
1717
products: [
1818
.library(name: "firebase-analytics", targets: ["firebase_analytics"])

0 commit comments

Comments
 (0)