Start by creating a Google Firebase account if you don't have one, then follow the steps below.
1) Go to https://firebase.google.com
Get Started and Create your project. In this tutorial, we’re using ‘Cool-iOS-App’ as an example.
2) Click 'Add Project'
3) Name your project
You can name your project anything you want. Feel free to click the pencil button if you want to rename the auto-generated id.
4) Select your platform
In this example, select iOS. You can use the same project for Android, Web or other platforms.
5) iOS Platform configuration
Enter the name of your iOS app. It can be the same name as your Firebase project. Then enter your iOS app's bundle identifier.
brIf you've purchased an app template from Apps4World, you can open the Xcode project, change the bundle identifier to anything unique, then run the app template on a physical device, this process will register your bundle identifier on Apple Developer Portal.
You can also create the bundle identifier on Apple Developer Portal
Click the 'Register app' in Firebase
6) Download GoogleServices-Info.plist file
You will need to add this file to your Xcode project.
If you're using an iOS app template from Apps4World, then you simply open the folder where this file is located and replace it with your own file that you just downloaded.
7) Update Firebase Firestore & Firebase Storage rules
Select the Storage -> Rules and update your rules as shown below.
Repeat the same step for Firestore Database -> Rules.
NOTE: These rules are good for development/debugging, but make sure to update them properly when you publish your app.
Ideally you should allow 'write/read' access only for authenticated users, if your app supports Firebase Authentication.
Q) How do I update my bundle identifier?
A) You can select the settings 'gear' icon on the top left navigation bar in Firebase, next to Project Overview, then select Project Settings and scroll down to 'Your apps' section. Here you can add/remove more iOS bundle identifiers.
Q) Can I use the same Firebase database for multiple projects?
A) Yes. You can use the same Firebase Project and it's database for multiple iOS/Android apps. Just like the previous question, you can add more apps via the Project Settings.
If you have any questions or suggestions, please feel free to send an email to email@example.com
Thanks for reading!