Firebase is a database that can be used to save user data. It can create accounts in apps for users to log in and out of. We will show you how to implement this database into your Swift projects.
Create and configure the Firebase Project
Create Project
- In the [Firebase console](https://console.firebase.google.com/?_gl=1*1b9u2jm*_ga*MTE1MzY3MDIuMTc0MDQ2MDgzNw.._ga_CW55HF8NVTMTc0MDYwMDIwNS41LjEuMTc0MDYwMTIyOS4zMy4wLjA.), click Add project.
- To add Firebase resources to an existing Google Cloud project, enter its project name or select it from the dropdown menu.
- To create a new project, enter the desired project name. You can also optionally edit the project ID displayed below the project name.
- If prompted, review and accept the Firebase terms.
- Click Continue.
- Click Create project (or Add Firebase, if you're using an existing Google Cloud project).
Firebase automatically provisions resources for your Firebase project. When the process completes, you'll be taken to the overview page for your Firebase project in the Firebase console.
Enable Firebase Authentication
Navigate to the Authentication Section:
In the Firebase console sidebar, click on “Authentication”.
Go to the “Sign-in method” tab.
Enable a Sign-In Provider:
For example, enable Email/Password:
Click on the “Email/Password” provider.
Toggle the enable switch and save.
You can also enable other providers (Google, Facebook, etc.) as needed.
Enable Firebase Firestone
Set Up Firestore:
In the Firebase console sidebar, click on “Firestore Database”.