Firebase Realtime Data Persistance

In order to enable persisting data I have to add a couple of line of code to the appdeligate.m file. Is there any way to do this without detaching from expo?

I have not used Firebase myself, but as far as I can see you should be able to use the Realtime Database functionality without ejecting.

The expo-firebase-* packages (which were based on react-native-firebase) were removed from Expo as explained here. But you can still use the JS SDK. According to the docs, Realtime Database is supported:

https://firebase.google.com/docs/web/setup#namespace

Edit:

After reading up a little more on this it seems that persistence on the local device doesn’t really work with the JS SDK e.g. these Stackoverflow answers.

So it seems you will have to eject in order to support that.

From what I can see all that needs to be done is to add the following line of code to the appdeligate.m file.

FirebaseDatabase.getInstance().setPersistenceEnabled(true);

Is there any way to do this without ejecting?

Unfortunately not.

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