Expo-firebase-analytics not compatible with react-native-firebase with EAS on IOS
See original GitHub issueSummary
There is a podspec version incompatibility between Expo’s Firebase analytics React-native-firebase when using EAS. I am using react-native-firebase as a plugin from in EAS managed.
The error appears to be because expo-firebase-analytics is using Firebase/CoreOnly (= 8.14.0) whereas react-native-firebase requires Firebase/CoreOnly (= 8.15.0).
I tried to use an older version of react-native-firebase but I can only go back several patch versions to where Expo 45 compatibility was introduced.
The simple fix seems to be to upgrade expo-firebase-analytics to v8.15.0. As side note Android is working perfectly.
⚠️ Something went wrong running pod install
in the ios
directory.
Command pod install
failed.
└─ Cause: CocoaPods could not find compatible versions for pod “Firebase/CoreOnly”:
In Podfile:
EXFirebaseAnalytics (from ../node_modules/expo-firebase-analytics/ios
) was resolved to 7.0.0, which depends on
Firebase/Core (= 8.14.0) was resolved to 8.14.0, which depends on
Firebase/CoreOnly (= 8.14.0)
RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 14.9.1, which depends on
Firebase/CoreOnly (= 8.15.0)
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
iOS
SDK Version (managed workflow only)
45
Environment
expo-env-info 1.0.3 environment info: System: OS: macOS 11.6.5 Shell: 3.2.57 - /bin/bash Binaries: Node: 14.17.3 - /usr/local/bin/node Yarn: 1.22.11 - /usr/local/bin/yarn npm: 8.3.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 23, 25, 26, 27, 28, 29 Build Tools: 27.0.3, 28.0.2, 28.0.3, 29.0.2 System Images: android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: 13.0/13A233 - /usr/bin/xcodebuild npmPackages: babel-preset-expo: ~9.1.0 => 9.1.0 expo: ^45.0.0 => 45.0.4 react: 17.0.2 => 17.0.2 react-dom: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-web: 0.17.7 => 0.17.7 react-navigation: ^4.4.4 => 4.4.4 npmGlobalPackages: eas-cli: 0.52.0 expo-cli: 5.4.4 Expo Workflow: managed
Reproducible demo
install expo firebase analytics
expo install expo-firebase-analytics
https://rnfirebase.io/#expo
yarn add @react-native-firebase/app yarn add @react-native-firebase/crashlytics
do local prebuild produces same result as eas build
expo prebuild --clean
Issue Analytics
- State:
- Created a year ago
- Comments:14 (6 by maintainers)
Using @react-native-firebase/analytics solved the issue
Ha I came back to comment nevermind cause I just saw this:
https://github.com/invertase/react-native-firebase/issues/5629#issuecomment-903172565
Removing it from the pugins array in app config worked like a charm, thanks!