Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
937c870
chore: update @react-native-firebase packages to version 22.2.1
sofi-a Jul 4, 2025
2079d19
refactor: migrate all @react-native-firebase/analytics references to …
sofi-a Jul 5, 2025
79b0f48
refactor: migrate all @react-native-firebase/crashlytics references t…
sofi-a Jul 5, 2025
b6ea5d2
refactor: migrate all @react-native-firebase/perf references to use F…
sofi-a Jul 5, 2025
e25d9ac
chore: update @react-native-firebase patches to version 22.2.1
sofi-a Jul 8, 2025
2df38c6
chore: update mock implementations for analytics, crashlytics, and pe…
sofi-a Jul 8, 2025
9946457
chore: add details.md with explanations for @react-native-firebase pa…
sofi-a Jul 9, 2025
9595541
fix: unable to resolve superstruct's main module
sofi-a Jul 9, 2025
993d0ed
Merge branch 'main' into 64814-update-firebase-dependencies
sofi-a Jul 9, 2025
0161859
chore(ios): upgrade Firebase dependencies from version 8.8.0 to 11.13.0
sofi-a Jul 10, 2025
b545cba
Merge branch 'main' into 64814-update-firebase-dependencies
sofi-a Jul 10, 2025
0e1ddc4
chore: add "nanopb" to the spell checker's words list
sofi-a Jul 10, 2025
25b1236
refactor: changed Firebase integration to use static frameworks
sofi-a Jul 16, 2025
47e4365
Merge branch 'main' into 64814-update-firebase-dependencies
sofi-a Jul 16, 2025
1ab4b27
fix: enable default flags in Podfile
sofi-a Jul 18, 2025
358048f
Revert "chore: add "nanopb" to the spell checker's words list"
sofi-a Jul 18, 2025
274c8b9
Merge branch 'main' into 64814-update-firebase-dependencies
sofi-a Jul 18, 2025
66063a3
Merge branch 'main' into 64814-update-firebase-dependencies
sofi-a Jul 25, 2025
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
9 changes: 4 additions & 5 deletions __mocks__/@react-native-firebase/analytics.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export default function analytics() {
return {
logEvent: jest.fn(),
};
}
const logEvent = jest.fn();
const getAnalytics = jest.fn();

export {logEvent, getAnalytics};
19 changes: 6 additions & 13 deletions __mocks__/@react-native-firebase/crashlytics.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import type {FirebaseCrashlyticsTypes} from '@react-native-firebase/crashlytics';

type CrashlyticsModule = Pick<FirebaseCrashlyticsTypes.Module, 'log' | 'recordError' | 'setCrashlyticsCollectionEnabled' | 'setUserId'>;

type CrashlyticsMock = () => CrashlyticsModule;

// <App> uses <ErrorBoundary> and we need to mock the imported crashlytics module
// due to an error that happens otherwise https://github.com/invertase/react-native-firebase/issues/2475
const crashlyticsMock: CrashlyticsMock = () => ({
log: jest.fn(),
recordError: jest.fn(),
setCrashlyticsCollectionEnabled: jest.fn(),
setUserId: jest.fn(),
});
const getCrashlytics = jest.fn();
const log = jest.fn();
const recordError = jest.fn();
const setCrashlyticsCollectionEnabled = jest.fn();
const setUserId = jest.fn();

export default crashlyticsMock;
export {getCrashlytics, log, recordError, setCrashlyticsCollectionEnabled, setUserId};
7 changes: 3 additions & 4 deletions __mocks__/@react-native-firebase/perf.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
type PerfMock = () => void;
/* eslint-disable import/prefer-default-export */
const getPerformance = jest.fn();

const perfMock: PerfMock = () => {};

export default perfMock;
export {getPerformance};
22 changes: 20 additions & 2 deletions ios/NewExpensify.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

pod 'FirebaseCrashlytics'
pod 'FirebaseRemoteConfig'
pod 'FirebaseSessions'

pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'FirebaseInstallations', :modular_headers => true
pod 'FirebaseABTesting', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'GoogleDataTransport', :modular_headers => true
pod 'nanopb', :modular_headers => true

Check failure on line 113 in ios/Podfile

View workflow job for this annotation

GitHub Actions / 🔍 spellcheck

Unknown word (nanopb)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm why do we need to add these pod manually here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept getting the following error after updating the Firebase dependencies on iOS. It's an issue that happens when importing Objective-C modules inside Swift code.

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod FirebaseCoreInternal depends upon GoogleUtilities, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

The Swift pod FirebaseCrashlytics depends upon FirebaseCore, FirebaseInstallations, GoogleDataTransport, GoogleUtilities, and nanopb, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

The Swift pod FirebaseRemoteConfig depends upon FirebaseABTesting, FirebaseCore, FirebaseInstallations, and GoogleUtilities, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

The Swift pod FirebaseSessions depends upon FirebaseCore, FirebaseCoreExtension, FirebaseInstallations, GoogleDataTransport, GoogleUtilities, and nanopb, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to explore an alternative solution rather than this workaround. Here's the comment from the maintainer of react-native-firebase about this workaround:

I still see people trying to use use_modular_headers in combination with Firebase pods - I need to be very clear (as your friendly neighborhood react-native-firebase maintainer 👋) that you will have no ability to access support for any problems you have if you do that

The firebase-ios-sdk requires use_frameworks! so react-native-firebase does as well. modular_headers in that sense is a hack workaround that you should not use - you need to find the underlying problem in whatever module isn't compiling correctly with use_frameworks! and fix that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a very serious warning. Let me check.


post_install do |installer|
# Configure Mapbox after installation
$RNMapboxMaps.post_install(installer)
Expand Down
Loading
Loading