Once you’ve created a Firebase account, you can host multiple Firebase Projects within it, that can host multiple mobile apps.
You need to create a mobile app project in Firebase for each app that you are planning to publish. If you are publishing to both iOS and Android, you will need to create two apps in Firebase, since technically they are different apps.
In the Firebase Console, let’s also create a new project and a new mobile app. If you want your React Native app to run on both iOS and Android, then you need to create a different mobile app for each (in Firebase). Simply click on “Add App” button.
After you select the platform (iOS or Android), you need to provide the app’s identifier. Depending on which React Native template you’ve purchased, it can be different. You can find the correct identifier in the files you’ve downloaded:
- for Android, go to android/app/build.gradle and get the applicationId (usually line 101)
- for iOS, open the app in Xcode and locate the Bundle ID field in the project’s configuration:
Once you have the bundle ID, just use it in Firebase and create the app.
Note: Before you submit your app to the App Store or Google Play, you’ll need to update these bundle identifiers with your own unique identifiers, since the app stores don’t allow duplicate application ids.