I'm trying to set up a firebase database in react-native. Google does not seem to provide an SDK for iOS apps anymore, and many of the pieces of information are in new locations. I'm wondering how to find the information here:
const firebaseConfig = {
apiKey: <value>
authDomain: <value>
databaseURL: <value>
projectId: <value>
storageBucket: <value>
messagingSenderId: <value>
appId: <value>
};
I'm getting the error "Firebase App named [DEFAULT] already exists with different options or config (app/duplicate-app)" with the settings I found on my firebase account and I'm not sure how to troubleshoot this.
you can get firebaseConfig from firebase settings. You need to register your ios bundle id in there so you can use cloud firestore or realtime database.
To avoid the given error. Try using this,
if(firebase.apps.length == 0){
firebase.initializeApp(firebaseConfig);
}