Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 25, 2022 05:27 am GMT

How To Set Up Firebase with Flutter for iOS and Android Apps?

we know that adding some important features to your app like authentication & registration is a pain in the neck and you are probably looking for some final fix for your data storage and registration process for the flutter project, then this article is a must-read for you.

Flutter is a rapidly growing technology in today's world. Each year we build abundant apps for our clients using Flutter. It allows us to develop cross-platform applications for all operating systems, however, its mostly used for Android and iOS. While developing different kinds of apps and software we often require authentication, registration (sign-in/sign-up), and data storage features, for instance in games you must save players' info and ranking. We generally use Firebase for this purpose, its also our teams favorite tool to use with Flutter.

What is FireBase?

Firebase is a Google-backed application development software that allows developers to build iOS, Android, and Web apps. It provides tools for tracking analytics, reporting and fixing app crashes, creating marketing and product experiments.

Recently, weve successfully integrated Firebase in one of our flutter game apps The Werewolves Escape in which we have added a quick & smooth registration (sign-in/sign-up) process along with a leaderboard that keeps a record of players ranking and keeps the spirit of playing alive.

Image descriptionImage descriptionImage description

For the registration process, weve used Firebase authentication that provides backend services, ready-made UI libraries, and easy-to-use SDKs. It helps to authenticate users to your app using special passwords, phone numbers, prevalent identity providers like Google, Twitter, Facebook, etc.

Firebase Authentication strongly integrates with other Firebase services, and it leverages industry levels such as OAuth 2.0 and OpenID Connect, so it can be easily integrated with your custom backend.

For the leaderboard, weve utilized Firestore which is a NoSQL Database like a real-time database, but the difference lies in the structure of data storage. Real-time database stockpiles data in a JSON tree.

Here are some steps to create a new project on Firebase

  • Create a project file in the Firebase console.
  • Add two apps one for android and the other for IOS

For iOS

  • Register the IOS app to firebase with the bundle id of the App
  • Download Google Service-info for your app and add it to your project folder.
  • Complete the next steps on the firebase console.

For Android

  • Register your android app
  • Download the config file google services.json and set it in the application module of an android project.

Create Database

On the Firebase console from the left menu select the Database option to create a Cloud Firestore database. Select security rules for the database and then select test mode, it will make the database public, anyone can read and write to this database.

In Cloud Firestore we have a collection. A collection can have any number of Documents, which contain data. It scales automatically. The current scaling limit is around 1 million concurrent connections & approx.


Original Link: https://dev.to/wolfizsolutions/how-to-set-up-firebase-with-flutter-for-ios-and-android-apps-5a8f

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To