How to switch back to the production Firebase after connecting a RN app to the Firebase emulator #7848
Unanswered
hayata-suenaga
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
You can connect your development app to the Firebase emulator running on your development device by using
firestore().useEmulator(origin, 8080)
orauth().useEmulator(
http://${origin}:9099)
.However, reverting to the production instance is not straightforward. The app appears to keep communicating with the Emulator instead of the production Firebase, even when the
useEmulator
invocations are commented out. A potential workaround is to uninstall the development client app and reinstall it.The issue might arise because the default Firebase app instance, once configured to connect to the emulator, continues to do so even after the app restarts.
I attempted to delete the default app instance and reinitialize it, but deleting the default Firebase app instance seems to be impossible.
Does anyone have a solution for smoothly switching between the production and emulator instances?
Beta Was this translation helpful? Give feedback.
All reactions