Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Archiving expo-firebase

We started building expo-firebase based off of react-native-firebase in order to attempt to get it to work well within the Expo client. It turned out that there wasn't a good way to do this - the SDK fully expects that there is one binary per app, and the Expo client has multiple apps inside of it. We weren't able to work around this.

If you'd like to use Firebase in the Expo client with the managed workflow, we'd recommend using the Firebase JS SDK. It supports Firebase Realtime Database and Firebase Storage. If you'd like access to the full suite of native firebase tools, we recommend using the bare workflow and react-native-firebase, because we cannot support this in the Expo client currently.

@mgscreativa

This comment has been minimized.

Copy link

commented Mar 15, 2019

So, if I use react-native-firebase I don't need to use react-native link or similar?

@brentvatne

This comment has been minimized.

Copy link
Owner Author

commented Mar 19, 2019

you do need to link it, yes. the firebase native sdk is only supported in bare workflow projects. you can use the firebase js sdk in managed workflow projects.

@EKoetsjarjan

This comment has been minimized.

Copy link

commented Mar 21, 2019

@brentvatne, what is the difference between bare and managed vworkflow projects?

@karlodegrano

This comment has been minimized.

Copy link

commented Mar 21, 2019

If you'd like access to the full suite of native firebase tools, we recommend using the bare workflow and react-native-firebase, because we cannot support this in the Expo client currently.

Hello @brentvatne, did you mean if I want to use other Firebase tools such as Crashlytics, I would not be able to use ExpoKit?

@christanfoden

This comment has been minimized.

Copy link

commented Mar 22, 2019

@brentvatne, what is the difference between bare and managed vworkflow projects?

https://docs.expo.io/versions/latest/introduction/managed-vs-bare/

@redpandatronicsuk

This comment has been minimized.

Copy link

commented Mar 26, 2019

Are you still maintaining the modules for ExpoKit users? I used to use react-native-firebase before and put a lot of work into porting the app over to use expo-firebase instead. Please don't tell me that was all wastes efforts and I need to migrate back to react-native-firebase now?

@redpandatronicsuk

This comment has been minimized.

Copy link

commented Mar 27, 2019

@karlodegrano you can still use react-native-firebasse in the ExpoKit project. I have done that before and it worked fine.If you haven't integrated expo-firebase yet, skip that and go straight for react-native-firebase. For users who used react-native-firebase before however and got rid of it in favour for expo-firebase, I don't know what the best answer is as it is not clear whether the Expo team just gave up on adding native Firebase to managed Expo apps or whether they are dropping expo-firebase as a project. In case they are dropping expo-firebase, I suppose the suggestion is to switch back to react-native-firebase, so when you have to update your app in the future you are not held back by expo-firebase. If anyone knows what the future direction for expo-friebase is, please leave a comment here so I can plan ahead. Thanks

@brentvatne

This comment has been minimized.

Copy link
Owner Author

commented Mar 28, 2019

@redpandatronicsuk

If anyone knows what the future direction for expo-friebase is, please leave a comment here so I can plan ahead. Thanks

we don't plan on maintaining it, sorry :( the idea was to build expo-firebase so that we could integrate it into the expo client and use it in expokit projects if needed to eject. given that 1) it didn't work out in the client and 2) we are migrating from expokit towards a less monolithic ejected project workflow ('bare' workflow), we can no longer justify the resources for creating and maintaining a library that will effectively serve the same purpose as react-native-firebase.

@karlodegrano

did you mean if I want to use other Firebase tools such as Crashlytics, I would not be able to use ExpoKit?

as far as i know that should all work just fine! we just will not be supporting libraries like https://www.npmjs.com/package/expo-firebase-app which are expo-specific wrappers around firebase native apis

@chrisdrackett

This comment has been minimized.

Copy link

commented May 1, 2019

does anyone know if firebase auth works in a expo project using the JS SDK?

@CricketLaChica

This comment has been minimized.

Copy link

commented May 2, 2019

@chrisdrackett

does anyone know if firebase auth works in a expo project using the JS SDK?

Yup, it does!

@brentvatne

This comment has been minimized.

Copy link
Owner Author

commented May 3, 2019

here's a tutorial that uses firebase auth: https://www.youtube.com/watch?v=6stMRtgQopk

@oriharel

This comment has been minimized.

Copy link

commented May 13, 2019

@brentvatne - just to be clear - If I use managed workflow, can my crashes report to Firebase Crashlytics? Is the integration just a matter of creating a project in Firebase and adding the keys to app.json?

@brentvatne

This comment has been minimized.

Copy link
Owner Author

commented May 13, 2019

on android you can integrate with crashlytics by adding the key to app.json but this is not currently available on ios for managed expo apps

@koenpunt

This comment has been minimized.

Copy link

commented May 18, 2019

How is this going to work now that Google is sunsetting Google Analytics for mobile, recommending users to switch to Firebase?

@daniocean

This comment has been minimized.

Copy link

commented May 19, 2019

I second @koenpunt. The JavaScript SDK doesn't support analytics and I'm not sure Google will add them in. Does this mean we'll have to switch to an alternative analytics provider in order to keep using Expo?

@brentvatne

This comment has been minimized.

Copy link
Owner Author

commented May 19, 2019

hello! it's unclear at this point what google means by this. i expect you should be able to continue using google analytics just fine because you're using the js sdk and not the native ios/android sdks.

@koenpunt

This comment has been minimized.

Copy link

commented May 19, 2019

it's unclear at this point what google means by this

What do you think is unclear about their plan?

We want to remind you that starting this October we will begin sunsetting this older style of Google Analytics for mobile apps reporting and the Google Analytics Services SDK. We are investing our resources in the latest style of app reporting in Google Analytics that works in conjunction with Firebase – Google’s integrated app developer platform. As such, the following will take place:

• Starting October, we will begin to decommission properties that were identified at the time of our first notice as receiving data exclusively from the Google Analytics Services SDK.
• Data collection and processing for such properties will stop October 31, 2019.
• Reporting access through our UI and API access will remain available for these properties’ historical data until January 31, 2020.
• After our service is fully turned down in February, 2020, these properties will no longer be accessible via our Google Analytics UI or API, and their data will be removed from Google Analytics servers. You will receive further notification as these deadlines approach.

We want to give you plenty of time to make the transition and start collecting new data using the Firebase SDK, since your historical data will no longer be available. Our latest solution, however, is even more intuitive and includes free and unlimited event reporting to meet the needs of app-centric businesses. We’ve invested heavily to make this solution best-in-class, with new features and capabilities, such as a more robust Audience builder and multi-dimensional report filtering, rolling-out continually. Additionally, our offering is closely integrated with other Google products and features to help grow your app business like Crashlytics, Google Ads, AdMob and Remote Config. For more information, visit the Help Center for an overview and list of available features.

@cmacdonnacha

This comment has been minimized.

Copy link

commented May 25, 2019

I have auth and firestore working just fine using the JS SDK, there's been no need to use any other package. However, I can't find any info on how to get firebase dynamic links to work. Can this be done with Expo?

@jellevdvliet

This comment has been minimized.

Copy link

commented Jun 1, 2019

@cmacdonnacha how did you get firestore working?

@cmacdonnacha

This comment has been minimized.

Copy link

commented Jun 1, 2019

@jellevdvliet I just followed the docs available here: https://firebase.google.com/docs/firestore

What you want is the web sdk.

@vpontis

This comment has been minimized.

Copy link

commented Jun 9, 2019

Thanks for the update here Brett!

I am using expo-firebase on an Expo SDK 32 version. I'm going to try bumping the Expo SDK to 33 and keeping expo-firebase. We will see how this goes...

I plan on switching from expo-firebase to react-native-firebase in the future.

@cmacdonnacha

This comment has been minimized.

Copy link

commented Jun 11, 2019

@vpontis, I'm not 100% sure but in order to use react-native-firebase I'm pretty sure you need to eject.

@vpontis

This comment has been minimized.

Copy link

commented Jun 12, 2019

@vpontis, I'm not 100% sure but in order to use react-native-firebase I'm pretty sure you need to eject.

Yes, you do. You also need to eject for the old expo-firebase package.

@hotaryuzaki

This comment has been minimized.

Copy link

commented Jun 17, 2019

i Almost spending 3 weeks to setup RN Firebase in expokit, but still.
I do not get any solution until now.
Error to error comes through.

My problem now,
If im using npm start,
when apps starts showing error:
RN Firebase core module was not found natively on android, ...
(but i can confirm i already setup correctly)

If I'm using react-native run-android,
build success but then got error:
java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=host.exp.exponent/.MainActivity } from null (pid=20229, uid=2000) not exported from uid 10274

is there any one who had same problem?

@yashlinmaistry

This comment has been minimized.

Copy link

commented Jul 19, 2019

@vpontis

I am using expo-firebase on an Expo SDK 32 version. I'm going to try bumping the Expo SDK to 33 and keeping expo-firebase. We will see how this goes...

I plan on switching from expo-firebase to react-native-firebase in the future.

I did it pan out for you?

I'm moving our expokit app to 33 this weekend. Do you recommend we also move to react-native-firebase?

@brentvatne

This comment has been minimized.

Copy link
Owner Author

commented Jul 19, 2019

@koenpunt - i imagine that the web google analytics js sdk, which people are using with expo currently, will continue to work. it seems that they will just sunset the google analytics native mobile sdks. but i do not work for google so i cannot say, feel free to reach out to them and update us here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.