ExpoKit with Firebase/Firestore seems to break compilation for iOS

Hey guys, i’m having an issue with an ejected ExpoKit app who’s build breaks if you include the Firebase/Firestore pod.

I’ve dropped this here as i’m trying to get as many eyes on it from you lovely people as possible to help, but i’ve also submitted this as a possible bug at https://github.com/expo/expo/issues/1374, as i think it’s possible that something included by ExpoKit, or ExpoKit itself, could be causing issues with duplicate types.

Environment
https://exp-xde-diagnostics.s3.amazonaws.com/danmatthews-4f0370a0-ba5f-4ea1-a8a2-e2b56d626bdb.tar.gz.

Steps to Reproduce
:white_check_mark: = Yep, it does, for me at least.

  • Create a new create-react-native-app.
  • Verify app running with yarn start and Expo app for iOS.
  • Eject app to Expokit
  • Run npm install to set up new dependencies
  • Run pod install in the iOS folder.
  • Verify runs and builds in both debug and release configurations :white_check_mark:
  • Add the firebase pods to your Podfile (Firebase/Core, Firebase/Auth, and Firebase/Firestore) and run pod install.
  • 8 Re-open Xcode and verify that it still builds for both schemes :white_check_mark:
  • Install react-native firebase npm install react-native-firebase --save
  • Link it using RN - react-native link react-native-firebase.
  • Attempt to build for either configuration - both fail. :x:

Expected Behavior
The app would compile and run as normal.

Actual Behavior

Xcode spits out a bunch of “semantic issues” - you can see a screenshot of one such error below (there are either 36 errors for debug scheme, or 24 for release).

The error is marked as coming from RNFirebase - however, it has been noted here:
invertase/react-native-firebase#758

That extraneous header paths might have caused problems, and using the invertase fork of react-native-google-sign-in seems to have solved the problem for some.

Unfortunately, i can’t test removing the Expo pods to build, as that produces a build error of it’s own, and using the non-expo fork of React native also causes an error as your fork calls a certain constructor not available in Vanilla RN.

I realise this might be something to do with my machine, so if anyone could point me in the right direction to look, i would be immensely greatful as this is stopping delivery of app builds to a client.

Please check out the demo i’ve put up on github below and see if you can spot my error and/or if it builds okay for you using the steps to reproduce.

Reproducible Demo
https://github.com/danmatthews/bugbuild-rnfirebasexpo

Thank you!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.