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
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you do not meet these prerequisites, follow the links below:
- [React Native - Setting up the development environment](https://reactnative.dev/docs/environment-setup)
- [Create a new Firebase project](https://console.firebase.google.com/)

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).
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).

## Installation for Expo projects

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

```ruby
# Override Firebase SDK Version
$FirebaseSDKVersion = '11.15.0'
$FirebaseSDKVersion = '12.0.0'
```

Once changed, reinstall your projects pods via pod install and rebuild your project with `npx react-native run-ios`.
Expand Down
12 changes: 12 additions & 0 deletions docs/migrating-to-v23.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ const multiFactorUser = credential.user.multiFactor;
console.log(multiFactorUser.enrolledFactors);
```

# Firebase App

- `gaMeasurementId` property from `FirebaseOptions` has been replaced with `measurementId` to match Firebase web JS SDK.

# Firebase Dynamic Links

⚠️ **REMOVED** ⚠️

Firebase Dynamic Links has been Removed

This package has been deprecated and removed from the React Native Firebase repository.

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

# iOS platform

- Minimum iOS deployment target has now been bumped to `15` from `13`.
- Minimum Xcode version required for iOS development is now Xcode `16.2`, previous was Xcode `15.2`.
- `gaMeasurementId` property from `FirebaseOptions` (now `measurementId` in React Native Firebase) has been removed from firebase-ios-sdk as it wasn't used.

# Web platform

- Firebase JS SDK has been bumped to `12.0.0` which now requires a minimum of Node.js `20` and a minimum of `ES2020`.
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/lib/web/RNFBAnalyticsModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function getAnalyticsApi(appName) {
if (!measurementId) {
// eslint-disable-next-line no-console
console.warn(
'No measurement id found for Firebase Analytics. Analytics will be unavailable. Have you set gaTrackingId in your Firebase config?',
'No measurement id (`FirebaseOptions.measurementId`) found for Firebase Analytics. Analytics will be unavailable.',
);
}
if (!analyticsInstances[measurementId]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static Map<String, Object> firebaseAppToMap(FirebaseApp firebaseApp) {
options.put("appId", appOptions.getApplicationId());
options.put("projectId", appOptions.getProjectId());
options.put("databaseURL", appOptions.getDatabaseUrl());
options.put("gaTrackingId", appOptions.getGaTrackingId());
options.put("measurementId", appOptions.getGaTrackingId());
options.put("messagingSenderId", appOptions.getGcmSenderId());
options.put("storageBucket", appOptions.getStorageBucket());

Expand Down Expand Up @@ -82,8 +82,8 @@ public static FirebaseApp readableMapToFirebaseApp(
builder.setProjectId(options.getString("projectId"));
builder.setDatabaseUrl(options.getString("databaseURL"));

if (options.hasKey("gaTrackingId")) {
builder.setGaTrackingId(options.getString("gaTrackingId"));
if (options.hasKey("measurementId")) {
builder.setGaTrackingId(options.getString("measurementId"));
}

builder.setStorageBucket(options.getString("storageBucket"));
Expand Down
3 changes: 0 additions & 3 deletions packages/app/ios/RNFBApp/RCTConvert+FIROptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ + (FIROptions *)convertRawOptions:(NSDictionary *)rawOptions {
firOptions.APIKey = [rawOptions valueForKey:@"apiKey"];
firOptions.projectID = [rawOptions valueForKey:@"projectId"];
firOptions.clientID = [rawOptions valueForKey:@"clientId"];
firOptions.trackingID = [rawOptions valueForKey:@"gaTrackingId"];
firOptions.databaseURL = [rawOptions valueForKey:@"databaseURL"];
firOptions.storageBucket = [rawOptions valueForKey:@"storageBucket"];
firOptions.androidClientID = [rawOptions valueForKey:@"androidClientId"];
firOptions.deepLinkURLScheme = [rawOptions valueForKey:@"deepLinkURLScheme"];
firOptions.bundleID = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"];
return firOptions;
}
Expand Down
5 changes: 1 addition & 4 deletions packages/app/ios/RNFBApp/RNFBAppModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,7 @@ - (void)invalidate {
if (![[options valueForKey:@"storageBucket"] isEqual:[NSNull null]]) {
firOptions.storageBucket = [options valueForKey:@"storageBucket"];
}
// kFirebaseOptionsDeepLinkURLScheme
if (![[options valueForKey:@"deepLinkURLScheme"] isEqual:[NSNull null]]) {
firOptions.deepLinkURLScheme = [options valueForKey:@"deepLinkURLScheme"];
}

// kFirebaseOptionsIosBundleId
if (![[options valueForKey:@"iosBundleId"] isEqual:[NSNull null]]) {
firOptions.bundleID = [options valueForKey:@"iosBundleId"];
Expand Down
3 changes: 0 additions & 3 deletions packages/app/ios/RNFBApp/RNFBSharedUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,10 @@ + (NSDictionary *)firAppToDictionary:(FIRApp *)firApp {
firAppOptions[@"appId"] = firOptions.googleAppID;
firAppOptions[@"projectId"] = firOptions.projectID;
firAppOptions[@"databaseURL"] = firOptions.databaseURL;
firAppOptions[@"gaTrackingId"] = firOptions.trackingID;
firAppOptions[@"storageBucket"] = firOptions.storageBucket;
firAppOptions[@"messagingSenderId"] = firOptions.GCMSenderID;
// missing from android sdk - ios only:
firAppOptions[@"clientId"] = firOptions.clientID;
firAppOptions[@"androidClientID"] = firOptions.androidClientID;
firAppOptions[@"deepLinkUrlScheme"] = firOptions.deepLinkURLScheme;
// not in FIROptions API but in JS SDK and project config JSON
if ([RNFBAppModule getCustomDomain:name] != nil) {
firAppOptions[@"authDomain"] = [RNFBAppModule getCustomDomain:name];
Expand Down
3 changes: 1 addition & 2 deletions packages/app/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ export namespace ReactNativeFirebase {
/**
* The tracking ID for Google Analytics, e.g. "UA-12345678-1", used to configure Google Analytics.
*/
// TODO this should now be measurementId
gaTrackingId?: string;
measurementId?: string;

/**
* The Google Cloud Storage bucket name, e.g. "abc-xyz-123.storage.firebase.com".
Expand Down
6 changes: 1 addition & 5 deletions packages/app/lib/internal/web/RNFBAppModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ export default {
newAppConfig.automaticDataCollectionEnabled = appConfig.automaticDataCollectionEnabled;
}
const optionsCopy = Object.assign({}, options);
// TODO RNFB is using the old gaTrackingId property, we should remove this in the future
// in favor of the measurementId property.
if (optionsCopy.gaTrackingId) {
optionsCopy.measurementId = optionsCopy.gaTrackingId;
}

delete optionsCopy.clientId;
initializeApp(optionsCopy, newAppConfig);
return {
Expand Down
6 changes: 3 additions & 3 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
},
"sdkVersions": {
"ios": {
"firebase": "11.15.0",
"iosTarget": "13.0",
"firebase": "12.0.0",
Comment thread
russellwheatley marked this conversation as resolved.
"iosTarget": "15.0",
Comment thread
russellwheatley marked this conversation as resolved.
"macosTarget": "10.15",
"tvosTarget": "13.0"
"tvosTarget": "15.0"
},
"android": {
"minSdk": 23,
Expand Down
4 changes: 1 addition & 3 deletions tests/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,7 @@ global.FirebaseHelpers = {
projectId: 'react-native-firebase-testing',
storageBucket: 'react-native-firebase-testing.appspot.com',
messagingSenderId: '448618578101',
// TODO RNFB is using the old gaTrackingId property, we should remove this in the future
// in favor of the measurementId property.
gaTrackingId: 'G-HX0JQKHZEB',
measurementId: 'G-HX0JQKHZEB',
};
},
},
Expand Down
Loading
Loading