Skip to content

Commit 3ba08d6

Browse files
committed
merge in main
2 parents aa6570d + 6d27b1c commit 3ba08d6

File tree

184 files changed

+3535
-1046
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+3535
-1046
lines changed

.github/workflows/combine.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
name: combine
1616

17+
permissions:
18+
contents: read
19+
1720
on:
1821
workflow_dispatch:
1922
pull_request:
@@ -48,7 +51,7 @@ concurrency:
4851
jobs:
4952
xcodebuild:
5053
# Don't run on private repo unless it is a PR.
51-
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
54+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
5255
runs-on: macos-15
5356

5457
strategy:
@@ -74,7 +77,7 @@ jobs:
7477

7578
storage-combine-integration:
7679
# Don't run on private repo unless it is a PR.
77-
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
80+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name)
7881
env:
7982
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
8083
runs-on: macos-15

.github/workflows/firebaseai.yml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
name: firebaseai
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'FirebaseAI**'
7+
- '.github/workflows/firebaseai.yml'
8+
- 'scripts/quickstart_build_spm.sh'
9+
- 'scripts/quickstart_spm_xcodeproj.sh'
10+
- 'Gemfile*'
11+
schedule:
12+
# Run every day at 11pm (PST) - cron uses UTC times
13+
- cron: '0 7 * * *'
14+
workflow_dispatch:
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
18+
cancel-in-progress: true
19+
20+
permissions:
21+
contents: read # Needed for actions/checkout
22+
actions: write # Needed for actions/cache (save and restore)
23+
24+
jobs:
25+
spm-package-resolved:
26+
runs-on: macos-14
27+
outputs:
28+
cache_key: ${{ steps.generate_cache_key.outputs.cache_key }}
29+
env:
30+
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
31+
steps:
32+
- uses: actions/checkout@v4
33+
- name: Generate Swift Package.resolved
34+
id: swift_package_resolve
35+
run: |
36+
swift package resolve
37+
- name: Generate cache key
38+
id: generate_cache_key
39+
run: |
40+
cache_key="${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}"
41+
echo "cache_key=${cache_key}" >> "$GITHUB_OUTPUT"
42+
- uses: actions/cache/save@v4
43+
id: cache
44+
with:
45+
path: .build
46+
key: ${{ steps.generate_cache_key.outputs.cache_key }}
47+
48+
spm-unit:
49+
strategy:
50+
matrix:
51+
include:
52+
- os: macos-14
53+
xcode: Xcode_16.2
54+
target: iOS
55+
- os: macos-15
56+
xcode: Xcode_16.3
57+
target: iOS
58+
- os: macos-15
59+
xcode: Xcode_16.3
60+
target: tvOS
61+
- os: macos-15
62+
xcode: Xcode_16.3
63+
target: macOS
64+
- os: macos-15
65+
xcode: Xcode_16.3
66+
target: watchOS
67+
- os: macos-15
68+
xcode: Xcode_16.3
69+
target: catalyst
70+
- os: macos-15
71+
xcode: Xcode_16.3
72+
target: visionOS
73+
runs-on: ${{ matrix.os }}
74+
needs: spm-package-resolved
75+
env:
76+
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
77+
steps:
78+
- uses: actions/checkout@v4
79+
- uses: actions/cache/restore@v4
80+
with:
81+
path: .build
82+
key: ${{needs.spm-package-resolved.outputs.cache_key}}
83+
- name: Clone mock responses
84+
run: scripts/update_vertexai_responses.sh
85+
- name: Xcode
86+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
87+
- name: Install visionOS, if needed.
88+
if: matrix.target == 'visionOS'
89+
run: xcodebuild -downloadPlatform visionOS
90+
- name: Initialize xcodebuild
91+
run: scripts/setup_spm_tests.sh
92+
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
93+
with:
94+
timeout_minutes: 120
95+
max_attempts: 3
96+
retry_on: error
97+
retry_wait_seconds: 120
98+
command: scripts/build.sh FirebaseAIUnit ${{ matrix.target }} spm
99+
100+
testapp-integration:
101+
strategy:
102+
matrix:
103+
target: [iOS]
104+
os: [macos-15]
105+
include:
106+
- os: macos-15
107+
xcode: Xcode_16.3
108+
runs-on: ${{ matrix.os }}
109+
needs: spm-package-resolved
110+
env:
111+
TEST_RUNNER_FIRAAppCheckDebugToken: ${{ secrets.VERTEXAI_INTEGRATION_FAC_DEBUG_TOKEN }}
112+
TEST_RUNNER_VTXIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
113+
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
114+
secrets_passphrase: ${{ secrets.GHASecretsGPGPassphrase1 }}
115+
steps:
116+
- uses: actions/checkout@v4
117+
- uses: actions/cache/restore@v4
118+
with:
119+
path: .build
120+
key: ${{needs.spm-package-resolved.outputs.cache_key}}
121+
- name: Install Secret GoogleService-Info.plist
122+
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info.plist.gpg \
123+
FirebaseAI/Tests/TestApp/Resources/GoogleService-Info.plist "$secrets_passphrase"
124+
- name: Install Secret GoogleService-Info-Spark.plist
125+
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info-Spark.plist.gpg \
126+
FirebaseAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist "$secrets_passphrase"
127+
- name: Install Secret Credentials.swift
128+
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-Credentials.swift.gpg \
129+
FirebaseAI/Tests/TestApp/Tests/Integration/Credentials.swift "$secrets_passphrase"
130+
- name: Xcode
131+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
132+
- name: Run IntegrationTests
133+
run: scripts/build.sh FirebaseAIIntegration ${{ matrix.target }}
134+
135+
pod-lib-lint:
136+
# Don't run on private repo unless it is a PR.
137+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
138+
strategy:
139+
matrix:
140+
include:
141+
- os: macos-14
142+
xcode: Xcode_16.2
143+
swift_version: 5.9
144+
warnings:
145+
- os: macos-15
146+
xcode: Xcode_16.3
147+
swift_version: 5.9
148+
warnings:
149+
- os: macos-15
150+
xcode: Xcode_16.3
151+
swift_version: 6.0
152+
warnings:
153+
runs-on: ${{ matrix.os }}
154+
steps:
155+
- uses: actions/checkout@v4
156+
- name: Clone mock responses
157+
run: scripts/update_vertexai_responses.sh
158+
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
159+
- name: Setup Bundler
160+
run: scripts/setup_bundler.sh
161+
- name: Xcode
162+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
163+
- name: Set Swift swift_version
164+
run: sed -i "" "s#s.swift_version = '5.9'#s.swift_version = '${{ matrix.swift_version}}'#" FirebaseAI.podspec
165+
- name: Build and test
166+
run: scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseAI.podspec --platforms=${{ matrix.target }} ${{ matrix.warnings }}
167+
168+
quickstart:
169+
# Verifies the quickstart builds with this PR. Only run on pulls where branch is available.
170+
if: github.event_name == 'pull_request'
171+
runs-on: macos-15
172+
env:
173+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
174+
steps:
175+
- uses: actions/checkout@v4
176+
- name: Build Quickstart
177+
run: scripts/quickstart_build_spm.sh FirebaseAI

.github/workflows/firestore.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ jobs:
401401
- name: Setup Bundler
402402
run: ./scripts/setup_bundler.sh
403403
- name: Xcode
404-
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
404+
run: sudo xcode-select -s /Applications/Xcode_16.3.app/Contents/Developer
405405

406406
- name: Pod lib lint
407407
# TODO(#9565, b/227461966): Remove --no-analyze when absl is fixed.
@@ -494,19 +494,19 @@ jobs:
494494
xcode: Xcode_16.2
495495
target: iOS
496496
- os: macos-15
497-
xcode: Xcode_16.2
497+
xcode: Xcode_16.3
498498
target: iOS
499499
- os: macos-15
500-
xcode: Xcode_16.2
500+
xcode: Xcode_16.3
501501
target: tvOS
502502
- os: macos-15
503-
xcode: Xcode_16.2
503+
xcode: Xcode_16.3
504504
target: macOS
505505
- os: macos-15
506-
xcode: Xcode_16.2
506+
xcode: Xcode_16.3
507507
target: catalyst
508508
- os: macos-15
509-
xcode: Xcode_16.2
509+
xcode: Xcode_16.3
510510
target: visionOS
511511
runs-on: ${{ matrix.os }}
512512
env:

.github/workflows/notice_generation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: generate_notices
22

33
permissions:
44
pull-requests: write
5+
contents: write
56

67
on:
78
pull_request:

.github/workflows/vertexai.yml

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: vertexai
33
on:
44
pull_request:
55
paths:
6+
- 'FirebaseAI**'
67
- 'FirebaseVertexAI**'
78
- '.github/workflows/vertexai.yml'
89
- 'Gemfile*'
@@ -74,8 +75,6 @@ jobs:
7475
with:
7576
path: .build
7677
key: ${{needs.spm-package-resolved.outputs.cache_key}}
77-
- name: Clone mock responses
78-
run: scripts/update_vertexai_responses.sh
7978
- name: Xcode
8079
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
8180
- name: Install visionOS, if needed.
@@ -91,41 +90,6 @@ jobs:
9190
retry_wait_seconds: 120
9291
command: scripts/build.sh FirebaseVertexAIUnit ${{ matrix.target }} spm
9392

94-
testapp-integration:
95-
strategy:
96-
matrix:
97-
target: [iOS]
98-
os: [macos-15]
99-
include:
100-
- os: macos-15
101-
xcode: Xcode_16.3
102-
runs-on: ${{ matrix.os }}
103-
needs: spm-package-resolved
104-
env:
105-
TEST_RUNNER_FIRAAppCheckDebugToken: ${{ secrets.VERTEXAI_INTEGRATION_FAC_DEBUG_TOKEN }}
106-
TEST_RUNNER_VTXIntegrationImagen: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
107-
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
108-
secrets_passphrase: ${{ secrets.GHASecretsGPGPassphrase1 }}
109-
steps:
110-
- uses: actions/checkout@v4
111-
- uses: actions/cache/restore@v4
112-
with:
113-
path: .build
114-
key: ${{needs.spm-package-resolved.outputs.cache_key}}
115-
- name: Install Secret GoogleService-Info.plist
116-
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info.plist.gpg \
117-
FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info.plist "$secrets_passphrase"
118-
- name: Install Secret GoogleService-Info-Spark.plist
119-
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-GoogleService-Info-Spark.plist.gpg \
120-
FirebaseVertexAI/Tests/TestApp/Resources/GoogleService-Info-Spark.plist "$secrets_passphrase"
121-
- name: Install Secret Credentials.swift
122-
run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/VertexAI/TestApp-Credentials.swift.gpg \
123-
FirebaseVertexAI/Tests/TestApp/Tests/Integration/Credentials.swift "$secrets_passphrase"
124-
- name: Xcode
125-
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}.app/Contents/Developer
126-
- name: Run IntegrationTests
127-
run: scripts/build.sh VertexIntegration ${{ matrix.target }}
128-
12993
pod-lib-lint:
13094
# Don't run on private repo unless it is a PR.
13195
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
@@ -147,8 +111,6 @@ jobs:
147111
runs-on: ${{ matrix.os }}
148112
steps:
149113
- uses: actions/checkout@v4
150-
- name: Clone mock responses
151-
run: scripts/update_vertexai_responses.sh
152114
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
153115
- name: Setup Bundler
154116
run: scripts/setup_bundler.sh

CoreOnly/NOTICES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
AppCheckCore
22
Firebase
33
FirebaseABTesting
4+
FirebaseAI
45
FirebaseAppCheck
56
FirebaseAppCheckInterop
67
FirebaseAppDistribution

Crashlytics/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 11.13.0
2+
- [fixed] Improved startup time by putting some initialization steps on a background. (#13675, #13232)
3+
14
# 11.9.0
25
- [fixed] Made on-demand fatal recording thread suspension configurable through setting to improve performance and avoid audio glitch on Unity. Change is for framework only.
36

Crashlytics/Crashlytics/Components/FIRCLSContext.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ __BEGIN_DECLS
3939
@class FIRCLSInstallIdentifierModel;
4040
@class FIRCLSFileManager;
4141
@class FIRCLSContextInitData;
42+
@class FBLPromise;
4243
#endif
4344

4445
typedef struct {
@@ -82,7 +83,8 @@ typedef struct {
8283
FIRCLSAllocatorRef allocator;
8384
} FIRCLSContext;
8485
#ifdef __OBJC__
85-
bool FIRCLSContextInitialize(FIRCLSContextInitData* initData, FIRCLSFileManager* fileManager);
86+
FBLPromise* FIRCLSContextInitialize(FIRCLSContextInitData* initData,
87+
FIRCLSFileManager* fileManager);
8688
FIRCLSContextInitData* FIRCLSContextBuildInitData(FIRCLSInternalReport* report,
8789
FIRCLSSettings* settings,
8890
FIRCLSFileManager* fileManager,

Crashlytics/Crashlytics/Components/FIRCLSContext.m

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
// We need enough space here for the context, plus storage for strings.
4747
#define CLS_MINIMUM_READABLE_SIZE (sizeof(FIRCLSReadOnlyContext) + 4096 * 4)
4848

49-
static const int64_t FIRCLSContextInitWaitTime = 5LL * NSEC_PER_SEC;
50-
5149
static const char* FIRCLSContextAppendToRoot(NSString* root, NSString* component);
5250
static void FIRCLSContextAllocate(FIRCLSContext* context);
5351

@@ -76,7 +74,8 @@
7674
return initData;
7775
}
7876

79-
bool FIRCLSContextInitialize(FIRCLSContextInitData* initData, FIRCLSFileManager* fileManager) {
77+
FBLPromise* FIRCLSContextInitialize(FIRCLSContextInitData* initData,
78+
FIRCLSFileManager* fileManager) {
8079
if (!initData) {
8180
return false;
8281
}
@@ -102,6 +101,8 @@ bool FIRCLSContextInitialize(FIRCLSContextInitData* initData, FIRCLSFileManager*
102101
// some values that aren't tied to particular subsystem
103102
_firclsContext.readonly->debuggerAttached = FIRCLSProcessDebuggerAttached();
104103

104+
__block FBLPromise* initPromise = [FBLPromise pendingPromise];
105+
105106
dispatch_group_async(group, queue, ^{
106107
FIRCLSHostInitialize(&_firclsContext.readonly->host);
107108
});
@@ -220,14 +221,10 @@ bool FIRCLSContextInitialize(FIRCLSContextInitData* initData, FIRCLSFileManager*
220221
if (!FIRCLSAllocatorProtect(_firclsContext.allocator)) {
221222
FIRCLSSDKLog("Error: Memory protection failed\n");
222223
}
224+
[initPromise fulfill:nil];
223225
});
224226

225-
if (dispatch_group_wait(group, dispatch_time(DISPATCH_TIME_NOW, FIRCLSContextInitWaitTime)) !=
226-
0) {
227-
FIRCLSSDKLog("Error: Delayed initialization\n");
228-
}
229-
230-
return true;
227+
return initPromise;
231228
}
232229

233230
void FIRCLSContextBaseInit(void) {

0 commit comments

Comments
 (0)