Skip to content

Commit aa6570d

Browse files
committed
Merge branch 'cheryllin/fixcmake' into cheryllin/ppl
2 parents ce1bb03 + 54b5b9f commit aa6570d

File tree

6 files changed

+98
-2
lines changed

6 files changed

+98
-2
lines changed

.github/workflows/firestore.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ jobs:
118118

119119
env:
120120
MINT_PATH: ${{ github.workspace }}/mint
121+
USE_LATEST_CMAKE: false
121122

122123
runs-on: ${{ matrix.os }}
123124
steps:
@@ -142,6 +143,11 @@ jobs:
142143
with:
143144
python-version: '3.11'
144145

146+
- name: Setup cmake
147+
uses: jwlawson/actions-setup-cmake@v2
148+
with:
149+
cmake-version: '3.31.1'
150+
145151
- name: Setup build
146152
run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
147153

@@ -168,6 +174,7 @@ jobs:
168174
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
169175
MINT_PATH: ${{ github.workspace }}/mint
170176
TARGET_DATABASE_ID: ${{ matrix.databaseId }}
177+
USE_LATEST_CMAKE: false
171178

172179
runs-on: ${{ matrix.os }}
173180
steps:
@@ -230,6 +237,11 @@ jobs:
230237
GOOGLE_APPLICATION_CREDENTIALS: ../google-service-account.json
231238
continue-on-error: true
232239

240+
- name: Setup cmake
241+
uses: jwlawson/actions-setup-cmake@v2
242+
with:
243+
cmake-version: '3.31.1'
244+
233245
- name: Setup build
234246
run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
235247

@@ -255,6 +267,7 @@ jobs:
255267

256268
env:
257269
SANITIZERS: ${{ matrix.sanitizer }}
270+
USE_LATEST_CMAKE: false
258271

259272
steps:
260273
- uses: actions/checkout@v4
@@ -271,6 +284,11 @@ jobs:
271284
with:
272285
python-version: '3.11'
273286

287+
- name: Setup cmake
288+
uses: jwlawson/actions-setup-cmake@v2
289+
with:
290+
cmake-version: '3.31.1'
291+
274292
- name: Setup build
275293
run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
276294

@@ -301,6 +319,7 @@ jobs:
301319
env:
302320
SANITIZERS: ${{ matrix.sanitizer }}
303321
ASAN_OPTIONS: detect_leaks=0
322+
USE_LATEST_CMAKE: false
304323

305324
steps:
306325
- uses: actions/checkout@v3
@@ -317,6 +336,11 @@ jobs:
317336
with:
318337
python-version: '3.11'
319338

339+
- name: Setup cmake
340+
uses: jwlawson/actions-setup-cmake@v2
341+
with:
342+
cmake-version: '3.31.1'
343+
320344
- name: Setup build
321345
run: scripts/install_prereqs.sh Firestore ${{ runner.os }} cmake
322346

FirebaseRemoteConfig/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Unreleased
2+
- [fixed] Fix an issue where network requests would fail in the iOS 18.4
3+
simulator due to a URLSession bug introduced in Xcode 16.3. (#14728)
4+
15
# 11.10.0
26
- [fixed] Fix intermittent `RCNConfigRealtime` crash due to incorrect parsing of fragmented JSON. (#14518)
37

FirebaseRemoteConfig/Sources/RCNConfigFetch.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#import "FirebaseRemoteConfig/Sources/RCNConfigConstants.h"
2525
#import "FirebaseRemoteConfig/Sources/RCNConfigContent.h"
2626
#import "FirebaseRemoteConfig/Sources/RCNConfigExperiment.h"
27+
#import "FirebaseRemoteConfig/Sources/RCNConfigSessionConfiguration.h"
2728
#import "FirebaseRemoteConfig/Sources/RCNDevice.h"
2829
@import FirebaseRemoteConfigInterop;
2930

@@ -641,7 +642,7 @@ - (NSString *)constructServerURL {
641642

642643
- (NSURLSession *)newFetchSession {
643644
NSURLSessionConfiguration *config =
644-
[[NSURLSessionConfiguration defaultSessionConfiguration] copy];
645+
[RCNConfigSessionConfiguration remoteConfigSessionConfiguration];
645646
config.timeoutIntervalForRequest = _settings.fetchTimeout;
646647
config.timeoutIntervalForResource = _settings.fetchTimeout;
647648
NSURLSession *session = [NSURLSession sessionWithConfiguration:config];
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#import <Foundation/Foundation.h>
18+
19+
@interface RCNConfigSessionConfiguration : NSObject
20+
21+
/// Returns an `NSURLSessionConfiguration` instance suitable for Remote Config requests.
22+
///
23+
/// On iOS 18.4+ and visionOS 2.4+ simulators, this method returns an ephemeral session
24+
/// configuration as a workaround for a network request failure bug. See
25+
/// https://developer.apple.com/forums/thread/777999 for details. For all other environments, the
26+
/// default session configuration is returned.
27+
+ (NSURLSessionConfiguration *)remoteConfigSessionConfiguration;
28+
29+
@end
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#import "FirebaseRemoteConfig/Sources/RCNConfigSessionConfiguration.h"
18+
19+
@implementation RCNConfigSessionConfiguration
20+
21+
+ (NSURLSessionConfiguration *)remoteConfigSessionConfiguration {
22+
// Check if the current operating system version meets the criteria of the affected simulators.
23+
if (@available(iOS 18.4, tvOS 100.0, watchOS 100.0, visionOS 2.4, *)) {
24+
// If the app is running on one of the affected simulator versions (or later for iOS and
25+
// visionOS), use an ephemeral session configuration. Ephemeral sessions do not persist caches,
26+
// cookies, or credential data to disk, which circumvents the known bug.
27+
return [NSURLSessionConfiguration ephemeralSessionConfiguration];
28+
}
29+
return [NSURLSessionConfiguration defaultSessionConfiguration];
30+
}
31+
32+
@end

scripts/install_prereqs.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ case "$project-$platform-$method" in
104104
;;
105105

106106
Firestore-iOS-cmake | Firestore-tvOS-cmake | Firestore-macOS-cmake)
107-
brew outdated cmake || brew upgrade cmake
107+
# Only upgrade CMake if explicitly requested
108+
if [[ "${USE_LATEST_CMAKE:-false}" == "true" ]]; then
109+
echo "Use latest CMake because USE_LATEST_CMAKE=true"
110+
brew outdated cmake || brew upgrade cmake
111+
else
112+
echo "Skipping CMake upgrade"
113+
fi
108114
brew outdated go || brew upgrade go # Somehow the build for Abseil requires this.
109115
brew install ccache
110116
brew install ninja

0 commit comments

Comments
 (0)