Skip to content

Commit e3d6d22

Browse files
russellwheatleymikehardy
authored andcommitted
feat!: bump firebase-ios-sdk to 12.0.0
BREAKING CHANGE: new minimums: iOS 15+, Xcode 16.2+
1 parent ab0529e commit e3d6d22

File tree

12 files changed

+231
-251
lines changed

12 files changed

+231
-251
lines changed

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If you do not meet these prerequisites, follow the links below:
1818
- [React Native - Setting up the development environment](https://reactnative.dev/docs/environment-setup)
1919
- [Create a new Firebase project](https://console.firebase.google.com/)
2020

21-
Additionally, current versions of firebase-ios-sdk have a minimum Xcode requirement of 15.2, which implies a minimum macOS version of 13.5 (macOS Ventura).
21+
Additionally, current versions of firebase-ios-sdk have a minimum Xcode requirement of 16.2, which implies a minimum macOS version of 14.5 (macOS Sequoia).
2222

2323
## Installation for Expo projects
2424

@@ -335,7 +335,7 @@ Open your projects `/ios/Podfile` and add any of the globals shown below to the
335335

336336
```ruby
337337
# Override Firebase SDK Version
338-
$FirebaseSDKVersion = '11.15.0'
338+
$FirebaseSDKVersion = '12.0.0'
339339
```
340340

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

docs/migrating-to-v23.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,16 @@ const multiFactorUser = credential.user.multiFactor;
2121
console.log(multiFactorUser.enrolledFactors);
2222
```
2323

24+
# Firebase App
25+
26+
- `gaMeasurementId` property from `FirebaseOptions` has been replaced with `measurementId` to match Firebase web JS SDK.
27+
2428
# Firebase Dynamic Links
2529

2630
⚠️ **REMOVED** ⚠️
2731

32+
Firebase Dynamic Links has been Removed
33+
2834
This package has been deprecated and removed from the React Native Firebase repository.
2935

3036
## Why was it deprecated?
@@ -57,6 +63,12 @@ Please refer to the official deprecation FAQ for complete migration guidance and
5763
- Performance gradle plugin has been bumped from `1.4.2` to `2.0.0`.
5864
- App distribution gradle plugin has been bumped from `5.1.1` to `5.1.2`.
5965

66+
# iOS platform
67+
68+
- Minimum iOS deployment target has now been bumped to `15` from `13`.
69+
- Minimum Xcode version required for iOS development is now Xcode `16.2`, previous was Xcode `15.2`.
70+
- `gaMeasurementId` property from `FirebaseOptions` (now `measurementId` in React Native Firebase) has been removed from firebase-ios-sdk as it wasn't used.
71+
6072
# Web platform
6173

6274
- Firebase JS SDK has been bumped to `12.0.0` which now requires a minimum of Node.js `20` and a minimum of `ES2020`.

packages/analytics/lib/web/RNFBAnalyticsModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function getAnalyticsApi(appName) {
1111
if (!measurementId) {
1212
// eslint-disable-next-line no-console
1313
console.warn(
14-
'No measurement id found for Firebase Analytics. Analytics will be unavailable. Have you set gaTrackingId in your Firebase config?',
14+
'No measurement id (`FirebaseOptions.measurementId`) found for Firebase Analytics. Analytics will be unavailable.',
1515
);
1616
}
1717
if (!analyticsInstances[measurementId]) {

packages/app/android/src/reactnative/java/io/invertase/firebase/common/RCTConvertFirebase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static Map<String, Object> firebaseAppToMap(FirebaseApp firebaseApp) {
5353
options.put("appId", appOptions.getApplicationId());
5454
options.put("projectId", appOptions.getProjectId());
5555
options.put("databaseURL", appOptions.getDatabaseUrl());
56-
options.put("gaTrackingId", appOptions.getGaTrackingId());
56+
options.put("measurementId", appOptions.getGaTrackingId());
5757
options.put("messagingSenderId", appOptions.getGcmSenderId());
5858
options.put("storageBucket", appOptions.getStorageBucket());
5959

@@ -82,8 +82,8 @@ public static FirebaseApp readableMapToFirebaseApp(
8282
builder.setProjectId(options.getString("projectId"));
8383
builder.setDatabaseUrl(options.getString("databaseURL"));
8484

85-
if (options.hasKey("gaTrackingId")) {
86-
builder.setGaTrackingId(options.getString("gaTrackingId"));
85+
if (options.hasKey("measurementId")) {
86+
builder.setGaTrackingId(options.getString("measurementId"));
8787
}
8888

8989
builder.setStorageBucket(options.getString("storageBucket"));

packages/app/ios/RNFBApp/RCTConvert+FIROptions.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ + (FIROptions *)convertRawOptions:(NSDictionary *)rawOptions {
2626
firOptions.APIKey = [rawOptions valueForKey:@"apiKey"];
2727
firOptions.projectID = [rawOptions valueForKey:@"projectId"];
2828
firOptions.clientID = [rawOptions valueForKey:@"clientId"];
29-
firOptions.trackingID = [rawOptions valueForKey:@"gaTrackingId"];
3029
firOptions.databaseURL = [rawOptions valueForKey:@"databaseURL"];
3130
firOptions.storageBucket = [rawOptions valueForKey:@"storageBucket"];
32-
firOptions.androidClientID = [rawOptions valueForKey:@"androidClientId"];
33-
firOptions.deepLinkURLScheme = [rawOptions valueForKey:@"deepLinkURLScheme"];
3431
firOptions.bundleID = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"];
3532
return firOptions;
3633
}

packages/app/ios/RNFBApp/RNFBAppModule.m

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,7 @@ - (void)invalidate {
190190
if (![[options valueForKey:@"storageBucket"] isEqual:[NSNull null]]) {
191191
firOptions.storageBucket = [options valueForKey:@"storageBucket"];
192192
}
193-
// kFirebaseOptionsDeepLinkURLScheme
194-
if (![[options valueForKey:@"deepLinkURLScheme"] isEqual:[NSNull null]]) {
195-
firOptions.deepLinkURLScheme = [options valueForKey:@"deepLinkURLScheme"];
196-
}
193+
197194
// kFirebaseOptionsIosBundleId
198195
if (![[options valueForKey:@"iosBundleId"] isEqual:[NSNull null]]) {
199196
firOptions.bundleID = [options valueForKey:@"iosBundleId"];

packages/app/ios/RNFBApp/RNFBSharedUtils.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,10 @@ + (NSDictionary *)firAppToDictionary:(FIRApp *)firApp {
5959
firAppOptions[@"appId"] = firOptions.googleAppID;
6060
firAppOptions[@"projectId"] = firOptions.projectID;
6161
firAppOptions[@"databaseURL"] = firOptions.databaseURL;
62-
firAppOptions[@"gaTrackingId"] = firOptions.trackingID;
6362
firAppOptions[@"storageBucket"] = firOptions.storageBucket;
6463
firAppOptions[@"messagingSenderId"] = firOptions.GCMSenderID;
6564
// missing from android sdk - ios only:
6665
firAppOptions[@"clientId"] = firOptions.clientID;
67-
firAppOptions[@"androidClientID"] = firOptions.androidClientID;
68-
firAppOptions[@"deepLinkUrlScheme"] = firOptions.deepLinkURLScheme;
6966
// not in FIROptions API but in JS SDK and project config JSON
7067
if ([RNFBAppModule getCustomDomain:name] != nil) {
7168
firAppOptions[@"authDomain"] = [RNFBAppModule getCustomDomain:name];

packages/app/lib/index.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ export namespace ReactNativeFirebase {
8585
/**
8686
* The tracking ID for Google Analytics, e.g. "UA-12345678-1", used to configure Google Analytics.
8787
*/
88-
// TODO this should now be measurementId
89-
gaTrackingId?: string;
88+
measurementId?: string;
9089

9190
/**
9291
* The Google Cloud Storage bucket name, e.g. "abc-xyz-123.storage.firebase.com".

packages/app/lib/internal/web/RNFBAppModule.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@ export default {
7474
newAppConfig.automaticDataCollectionEnabled = appConfig.automaticDataCollectionEnabled;
7575
}
7676
const optionsCopy = Object.assign({}, options);
77-
// TODO RNFB is using the old gaTrackingId property, we should remove this in the future
78-
// in favor of the measurementId property.
79-
if (optionsCopy.gaTrackingId) {
80-
optionsCopy.measurementId = optionsCopy.gaTrackingId;
81-
}
77+
8278
delete optionsCopy.clientId;
8379
initializeApp(optionsCopy, newAppConfig);
8480
return {

packages/app/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@
7474
},
7575
"sdkVersions": {
7676
"ios": {
77-
"firebase": "11.15.0",
78-
"iosTarget": "13.0",
77+
"firebase": "12.0.0",
78+
"iosTarget": "15.0",
7979
"macosTarget": "10.15",
80-
"tvosTarget": "13.0"
80+
"tvosTarget": "15.0"
8181
},
8282
"android": {
8383
"minSdk": 23,

0 commit comments

Comments
 (0)