react-native-firebase
react-native-firebase copied to clipboard
[🐛] Modular initializeFirestore() doesn't support non-default databases
trafficstars
Issue
🔥
Attempting to do this:
import {initializeFirestore} from '@react-native-firebase/firestore';
const db = await initializeFirestore(
this.app,
{
persistence: true,
},
'some-other-database'
);
initializes the db but it still talks to the (default) database.
See TODO here:
https://github.com/invertase/react-native-firebase/blob/66ef77dda6a3f23653d2292a67226745509e5bca/packages/firestore/lib/modular/index.js#L196
(not bothering with the rest of the details as it should be pretty obvious from the code, but let me know if you'd like it nonetheless. :))
Project Files
Javascript
Click To Expand
package.json:
"@react-native-firebase/app": "^21.13.0",
"@react-native-firebase/auth": "^21.13.0",
"@react-native-firebase/dynamic-links": "^21.13.0",
"@react-native-firebase/firestore": "^21.13.0",
"@react-native-firebase/functions": "^21.13.0",
"@react-native-firebase/storage": "^21.13.0",
firebase.json for react-native-firebase v6:
# N/A
iOS
Click To Expand
ios/Podfile:
- [ ] I'm not using Pods
- [x] I'm using Pods and my Podfile looks like:
# N/A
AppDelegate.m:
// N/A
Android
Click To Expand
Have you converted to AndroidX?
- [ ] my application is an AndroidX application?
- [ ] I am using
android/gradle.settingsjetifier=truefor Android compatibility? - [ ] I am using the NPM package
jetifierfor react-native compatibility?
android/build.gradle:
// N/A
android/app/build.gradle:
// N/A
android/settings.gradle:
// N/A
MainApplication.java:
// N/A
AndroidManifest.xml:
<!-- N/A -->
Environment
Click To Expand
react-native info output:
OUTPUT GOES HERE
- Platform that you're experiencing the issue on:
- [ ] iOS
- [ ] Android
- [ ] iOS but have not tested behavior on Android
- [ ] Android but have not tested behavior on iOS
- [ ] Both
react-native-firebaseversion you're using that has this issue:e.g. 5.4.3
Firebasemodule(s) you're using that has the issue:e.g. Instance ID
- Are you using
TypeScript?Y/N&VERSION
- 👉 Check out
React Native FirebaseandInvertaseon Twitter for updates on the library.