Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/scripts/compute-xcode-ccache-key.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/usr/bin/env bash
# Content hash for ccache-action keys without actions/hashFiles.
# hashFiles re-runs on Post-cache and can exceed the 120s limit on dirty CI trees
# (DerivedData, SPM checkouts under packages/*/ios). git ls-files only sees tracked
# sources, so Post can reuse the step output with no filesystem walk.
set -euo pipefail

usage() {
echo "usage: $0 <rn-bare|expo|e2e-ios|e2e-macos>" >&2
exit 2
}

[[ $# -eq 1 ]] || usage

case "$1" in
rn-bare)
PATHSPECS=(
yarn.lock
':(glob)test-rn-bare/*'
':(glob)test-rn-bare/ios/*'
':(glob)test-rn-bare/ios/testrnbare/**'
':(glob)test-rn-bare/ios/*.xcodeproj/**'
':(glob)packages/app/*'
':(glob)packages/app/ios/RNFB*/**'
':(glob)packages/app/ios/generated/**'
':(glob)packages/app/plugin/**'
':(exclude,glob)packages/app/ios/**/build/**'
)
;;
expo)
PATHSPECS=(
yarn.lock
':(glob)test-expo/*'
':(glob)test-expo/app/**'
':(glob)test-expo/src/**'
':(glob)test-expo/assets/**'
':(glob)packages/app/*'
':(glob)packages/app/ios/RNFB*/**'
':(glob)packages/app/ios/generated/**'
':(glob)packages/app/plugin/**'
':(exclude,glob)packages/app/ios/**/build/**'
)
;;
e2e-ios)
PATHSPECS=(
yarn.lock
':(glob)packages/*/*.podspec'
':(glob)packages/*/package.json'
':(glob)packages/*/ios/RNFB*/**'
':(glob)packages/*/ios/generated/**'
':(glob)packages/app/plugin/**'
tests/ios/Podfile.lock
':(exclude,glob)packages/*/ios/**/build/**'
)
;;
e2e-macos)
PATHSPECS=(
yarn.lock
':(glob)packages/*/*.podspec'
':(glob)packages/*/package.json'
':(glob)packages/*/ios/RNFB*/**'
':(glob)packages/*/ios/generated/**'
':(glob)packages/app/plugin/**'
tests-macos/macos/Podfile.lock
':(exclude,glob)packages/*/ios/**/build/**'
)
;;
*)
usage
;;
esac

# Stable order; each line is "<sha> <path>" so renames invalidate.
{
git ls-files -z -- "${PATHSPECS[@]}" \
| sort -z \
| while IFS= read -r -d '' f; do
shasum -a 256 -- "$f"
done
} | shasum -a 256 | awk '{print $1}'
11 changes: 9 additions & 2 deletions .github/workflows/test_expo_ios_link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- '**'
paths:
- 'test-expo/**'
- 'packages/app/package.json'
- 'packages/app/firebase_spm.rb'
- 'packages/app/firebase_json.rb'
- 'packages/app/RNFBApp.podspec'
Expand All @@ -27,6 +28,7 @@ on:
- release-v*
paths:
- 'test-expo/**'
- 'packages/app/package.json'
- 'packages/app/firebase_spm.rb'
- 'packages/app/firebase_json.rb'
- 'packages/app/RNFBApp.podspec'
Expand All @@ -52,7 +54,7 @@ jobs:
test-expo-ios-link:
name: test-expo iOS link + launch smoke
runs-on: xcode-27
timeout-minutes: 60
timeout-minutes: 90
env:
XCODE_VERSION: '27.0'
RNFB_IOS_SIM_RUNTIME: iOS 27.0
Expand Down Expand Up @@ -81,12 +83,17 @@ jobs:
- name: Configure Apple CI (Xcode 27 + iOS 27 runtime)
run: bash .github/workflows/scripts/configure-apple-ci.sh

# Precompute key: hashFiles re-runs on Post-cache and can exceed 120s on dirty trees.
- name: Compute Xcode compile cache key
id: xcode_cache_key
run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh expo)" >> "$GITHUB_OUTPUT"

# Sticky content-hash key (append-timestamp: false). Distinct from e2e (`expo-link` app id).
# https://github.com/hendrikmuhs/ccache-action/releases
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24
name: Xcode Compile Cache
with:
key: ${{ runner.os }}-expo-link-ios-v1-xcode27-${{ hashFiles('yarn.lock', 'test-expo/**', 'packages/app/ios/**', 'packages/app/*.podspec', 'packages/app/firebase_spm.rb', 'packages/app/firebase_json.rb', 'packages/app/plugin/**', 'packages/app/app.plugin.js') }}
key: ${{ runner.os }}-expo-link-ios-v4-xcode27-${{ steps.xcode_cache_key.outputs.key }}
append-timestamp: false
save: ${{ github.ref == 'refs/heads/main' }}
create-symlink: true
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/test_rn_bare_ios_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
- '.github/workflows/scripts/lib/rn-bare-probe-launch-assertions.sh'
- '.github/workflows/scripts/test-rn-bare-ios-launch-smoke.sh'
- '.github/workflows/scripts/configure-apple-ci.sh'
- '.github/workflows/scripts/compute-xcode-ccache-key.sh'
- 'packages/app/__tests__/rnfb_app_ios_objc_import_guard_test.rb'
- 'packages/app/__tests__/iosProbeSdkPin.test.js'
- 'packages/app/__tests__/iosProbeSingleCopyAssertions.test.js'
Expand All @@ -52,6 +53,7 @@ on:
- '.github/workflows/scripts/lib/rn-bare-probe-launch-assertions.sh'
- '.github/workflows/scripts/test-rn-bare-ios-launch-smoke.sh'
- '.github/workflows/scripts/configure-apple-ci.sh'
- '.github/workflows/scripts/compute-xcode-ccache-key.sh'
- 'packages/app/__tests__/rnfb_app_ios_objc_import_guard_test.rb'
- 'packages/app/__tests__/iosProbeSdkPin.test.js'
- 'packages/app/__tests__/iosProbeSingleCopyAssertions.test.js'
Expand Down Expand Up @@ -99,12 +101,17 @@ jobs:
- name: Configure Apple CI (Xcode 27 + iOS 27 runtime)
run: bash .github/workflows/scripts/configure-apple-ci.sh

# Precompute key: hashFiles re-runs on Post-cache and can exceed 120s on dirty trees.
- name: Compute Xcode compile cache key
id: xcode_cache_key
run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh rn-bare)" >> "$GITHUB_OUTPUT"

# Sticky content-hash key (append-timestamp: false). Distinct from e2e/expo (`rn-bare` app id).
# https://github.com/hendrikmuhs/ccache-action/releases
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24
name: Xcode Compile Cache
with:
key: ${{ runner.os }}-rn-bare-ios-v1-xcode27-${{ hashFiles('yarn.lock', 'test-rn-bare/**', 'packages/app/ios/**', 'packages/app/*.podspec', 'packages/app/firebase_spm.rb', 'packages/app/firebase_json.rb', 'packages/app/plugin/**', 'packages/app/app.plugin.js') }}
key: ${{ runner.os }}-rn-bare-ios-v3-xcode27-${{ steps.xcode_cache_key.outputs.key }}
append-timestamp: false
save: ${{ github.ref == 'refs/heads/main' }}
create-symlink: true
Expand Down Expand Up @@ -173,12 +180,17 @@ jobs:
- name: Configure Apple CI (Xcode 27 + iOS 27 runtime)
run: bash .github/workflows/scripts/configure-apple-ci.sh

# Precompute key: hashFiles re-runs on Post-cache and can exceed 120s on dirty trees.
- name: Compute Xcode compile cache key
id: xcode_cache_key
run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh rn-bare)" >> "$GITHUB_OUTPUT"

# Sticky content-hash key (append-timestamp: false). Distinct from shipped-path job (`rn-bare-dynfb`).
# https://github.com/hendrikmuhs/ccache-action/releases
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24
name: Xcode Compile Cache
with:
key: ${{ runner.os }}-rn-bare-dynfb-ios-v1-xcode27-${{ hashFiles('yarn.lock', 'test-rn-bare/**', 'packages/app/ios/**', 'packages/app/*.podspec', 'packages/app/firebase_spm.rb', 'packages/app/firebase_json.rb', 'packages/app/plugin/**', 'packages/app/app.plugin.js', 'packages/app/package.json') }}
key: ${{ runner.os }}-rn-bare-dynfb-ios-v3-xcode27-${{ steps.xcode_cache_key.outputs.key }}
append-timestamp: false
save: ${{ github.ref == 'refs/heads/main' }}
create-symlink: true
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/tests_e2e_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,18 @@ jobs:
path: ~/Library/Detox/ios
key: ${{ runner.os }}-detox-framework-cache-${{ steps.workflow-variables.outputs.xcode-version }}

# Precompute key: hashFiles re-runs on Post-cache and can exceed 120s on dirty trees.
- name: Compute Xcode compile cache key
id: xcode_cache_key
run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh e2e-ios)" >> "$GITHUB_OUTPUT"

# Detox is compiled during yarn install, using Xcode, set up cache first
# https://github.com/hendrikmuhs/ccache-action/releases
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24
name: Xcode Compile Cache
with:
# Sticky content-hash key (append-timestamp: false). SPM-only matrix (no cocoapods leg); debug/release stay distinct.
key: ${{ runner.os }}-e2e-${{ matrix.buildmode }}-ios-v5-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/ios/**', 'tests/ios/Podfile.lock') }}
key: ${{ runner.os }}-e2e-${{ matrix.buildmode }}-ios-v7-xcode27-${{ steps.xcode_cache_key.outputs.key }}
save: "${{ github.ref == 'refs/heads/main' && matrix.iteration == 0 }}"
append-timestamp: false
create-symlink: true
Expand Down Expand Up @@ -642,11 +647,15 @@ jobs:
key: ${{ runner.os }}-ios-yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-ios-yarn-v1

- name: Compute Xcode compile cache key
id: xcode_cache_key
run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh e2e-ios)" >> "$GITHUB_OUTPUT"

- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24
name: Xcode Compile Cache
with:
# Sticky content-hash key (append-timestamp: false). SPM-only archive job.
key: ${{ runner.os }}-e2e-archive-ios-v3-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/ios/**', 'tests/ios/Podfile.lock') }}
key: ${{ runner.os }}-e2e-archive-ios-v5-xcode27-${{ steps.xcode_cache_key.outputs.key }}
save: "${{ github.ref == 'refs/heads/main' }}"
append-timestamp: false
create-symlink: true
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/tests_e2e_other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,17 @@ jobs:
key: ${{ runner.os }}-macos-yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-macos-yarn-v1

# Precompute key: hashFiles re-runs on Post-cache and can exceed 120s on dirty trees.
- name: Compute Xcode compile cache key
id: xcode_cache_key
run: echo "key=$(bash .github/workflows/scripts/compute-xcode-ccache-key.sh e2e-macos)" >> "$GITHUB_OUTPUT"

# https://github.com/hendrikmuhs/ccache-action/releases
- uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24
name: Xcode Compile Cache
with:
# Sticky content-hash key (append-timestamp: false). Native sources live under packages/*/ios (no packages/*/macos tree).
key: ${{ runner.os }}-e2e-macos-v3-xcode27-${{ hashFiles('yarn.lock', 'packages/*/*.podspec', 'packages/*/ios/**', 'tests-macos/macos/Podfile.lock') }}
key: ${{ runner.os }}-e2e-macos-v5-xcode27-${{ steps.xcode_cache_key.outputs.key }}
save: "${{ github.ref == 'refs/heads/main' && matrix.iteration == 0 }}"
append-timestamp: false
create-symlink: true
Expand Down
4 changes: 2 additions & 2 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,12 @@ Open your projects `/ios/Podfile` and add any of the globals shown below to the

```ruby
# Override Firebase Apple SDK SPM exact pin if desired (see /ios-spm)
$FirebaseSDKVersion = '13.0.0'
$FirebaseSDKVersion = '13.1.0'
```

Once changed, reinstall your projects pods via pod install and rebuild your project with `npx react-native run-ios`.

Alternatively, if you cannot edit the Podfile easily (as when using Expo), you may add the environment variable `FIREBASE_SDK_VERSION=13.0.0` (or whatever SPM exact pin you need) to the command line that installs pods. For example `FIREBASE_SDK_VERSION=13.0.0 yarn expo prebuild --clean`
Alternatively, if you cannot edit the Podfile easily (as when using Expo), you may add the environment variable `FIREBASE_SDK_VERSION=13.1.0` (or whatever SPM exact pin you need) to the command line that installs pods. For example `FIREBASE_SDK_VERSION=13.1.0 yarn expo prebuild --clean`

### Android Performance

Expand Down
2 changes: 1 addition & 1 deletion docs/ios-spm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CocoaPods**. The last CocoaPods release is **12.19.0**. See Google's
- SPM requires CocoaPods 1.10 or newer for the React Native pod integration.
React Native 0.75+ templates already satisfy this requirement.
- SPM pins the Firebase iOS SDK to the exact version in
`sdkVersions.ios.firebase` in `@react-native-firebase/app` (currently **13.0.0**).
`sdkVersions.ios.firebase` in `@react-native-firebase/app` (currently **13.1.0**).

SPM requires dynamic framework linkage:

Expand Down
2 changes: 1 addition & 1 deletion packages/app/ios/RNFBFirebase/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let package = Package(
dependencies: [
.package(
url: "https://github.com/firebase/firebase-ios-sdk.git",
exact: "13.0.0"
exact: "13.1.0"
),
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
},
"sdkVersions": {
"ios": {
"firebase": "13.0.0",
"firebase": "13.1.0",
"firebaseSpmUrl": "https://github.com/firebase/firebase-ios-sdk.git",
"iosTarget": "15.0",
"macosTarget": "11.0",
Expand Down
2 changes: 1 addition & 1 deletion test-rn-bare/ios/testrnbare.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@
repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git";
requirement = {
kind = exactVersion;
version = 13.0.0;
version = 13.1.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
2 changes: 1 addition & 1 deletion tests/ios/testing.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@
repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git";
requirement = {
kind = exactVersion;
version = 13.0.0;
version = 13.1.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
Loading