{"id":38558,"date":"2025-05-14T20:40:05","date_gmt":"2025-05-14T15:10:05","guid":{"rendered":"https:\/\/mobisoftinfotech.com\/resources\/?p=38558"},"modified":"2026-03-11T18:17:41","modified_gmt":"2026-03-11T12:47:41","slug":"firebase-cloud-firestore-mobile-app-integration","status":"publish","type":"post","link":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration","title":{"rendered":"Step-by-Step Guide to Integrating Firebase Cloud Firestore into Your Mobile App"},"content":{"rendered":"<p>Firebase, developed by Google, is a very powerful platform that provides many essential backend services, such as Firebase Authentication, Firestore, Realtime Database, Messaging System, Crash Reporting, Machine Learning, Analytics, File Storage, and many more.<\/p>\n\n\n\n<p>In this blog, I will guide you through the step-by-step integration of Firebase Cloud Firestore and Firebase Authentication into your mobile app using<a href=\"https:\/\/mobisoftinfotech.com\/services\/flutter-app-development-company\"> flutter mobile app development<\/a>. Firebase Authentication is used to authenticate end users and onboard them onto your application, while Firestore is used to store and retrieve user data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>About Firebase Authentication<\/strong><strong>&nbsp;<\/strong><\/h2>\n\n\n\n<p>Firebase Authentication is a backend service designed to verify and authenticate end users through various methods. It allows you to authenticate users through:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Google Sign-In<\/li>\n\n\n\n<li>Sign-In with email and password<\/li>\n\n\n\n<li>Mobile number and OTP verification<\/li>\n\n\n\n<li>Social media accounts like Facebook, Twitter, etc.&nbsp;<\/li>\n\n\n\n<li>Anonymous and many more<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>About Firebase Firestore<\/strong><\/h2>\n\n\n\n<p>Firebase Firestore is a cloud-based, NoSQL database service that stores data in a flexible, non-tabular format. This offers flexibility for handling unstructured and semi-structured data. Firestore allows you to store, access, and query data specific to individual users.<\/p>\n\n\n\n<p>To demonstrate how to use Firebase Cloud Firestore, we&#8217;ll integrate it into a <strong>Flutter consulting<\/strong> app. Using a Task Management system as an example, we will add task details, fetch the task list, edit tasks, and delete tasks.<\/p>\n\n\n\n<p>Want to learn how to test your flutter app, check out this detail guide on&nbsp;<a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/flutter-unit-widget-integration-testing-guide\" target=\"_blank\" rel=\"noreferrer noopener\"> Flutter Testing: Unit, Widget &amp; Integration Tests Guide<\/a>&nbsp;for tips on testing your app\u2019s functionality across different layers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Steps to Setup the Firebase<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 1 : Create firebase project<\/strong><\/h4>\n\n\n\n<p>Navigate to the <a href=\"https:\/\/console.firebase.google.com\/u\/0\/\" target=\"_blank\" rel=\"noreferrer noopener\">Firebase Console<\/a> and click on the \u2018Create a Firebase project\u2019 option. Then enter the project name and Parent Resource, then click on the Continue button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"265\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/create-firebase-project.png\" alt=\"Create Firebase project for mobile app integration\" class=\"wp-image-38570\" title=\"Create a Firebase Project\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"265\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20265%22%3E%3C%2Fsvg%3E\" alt=\"Create Firebase project for mobile app integration\" class=\"wp-image-38570 lazyload\" title=\"Create a Firebase Project\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/create-firebase-project.png\"><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"386\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/start-firebase-project.png\" alt=\"Starting Firebase project for app backend\" class=\"wp-image-38572\" title=\"Start a New Firebase Project\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"386\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20386%22%3E%3C%2Fsvg%3E\" alt=\"Starting Firebase project for app backend\" class=\"wp-image-38572 lazyload\" title=\"Start a New Firebase Project\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/start-firebase-project.png\"><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 2 : Register Android app<\/strong><\/h4>\n\n\n\n<p>After successfully creating the project, You can see the <code>Add app<\/code> option on the dashboard screen. Click on Add app icon and then click on the Android icon from the options. Then, on the next screen, provide the package name of your Android app, nickname, and SHA-1 key (only required for Google sign-in). After entering the required information, click the <code>'Register App'<\/code> button. After app registration, download the json file named as <code>google-service.json<\/code> by clicking on the <code>Download google-service.json<\/code> button. Then you need to copy the downloaded json file into your <code>.\/android\/app\/<\/code> location of your project folder. This setup step is essential when working with professional <a href=\"https:\/\/mobisoftinfotech.com\/services\/android-app-development-company\">android app development services<\/a> to ensure proper configuration and integration.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"386\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/register-android-app.png\" alt=\"Register Android app in Firebase console\" class=\"wp-image-38573\" title=\"Register Your Android App with Firebase\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"386\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20386%22%3E%3C%2Fsvg%3E\" alt=\"Register Android app in Firebase console\" class=\"wp-image-38573 lazyload\" title=\"Register Your Android App with Firebase\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/register-android-app.png\"><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"488\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/add-firebase-to-android.png\" alt=\"Add Firebase SDK to Android app\" class=\"wp-image-38574\" title=\"Add Firebase to Your Android App\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"488\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20488%22%3E%3C%2Fsvg%3E\" alt=\"Add Firebase SDK to Android app\" class=\"wp-image-38574 lazyload\" title=\"Add Firebase to Your Android App\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/add-firebase-to-android.png\"><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"488\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-app-registration.png\" alt=\"Register mobile app in Firebase dashboard\n\" class=\"wp-image-38575\" title=\"Firebase App Registration\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"488\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20488%22%3E%3C%2Fsvg%3E\" alt=\"Register mobile app in Firebase dashboard\n\" class=\"wp-image-38575 lazyload\" title=\"Firebase App Registration\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-app-registration.png\"><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-directories-structure.png\" alt=\"Firebase directories for configuration files\" class=\"wp-image-38576\" title=\"Firebase Project Directory Structure\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20381%22%3E%3C%2Fsvg%3E\" alt=\"Firebase directories for configuration files\" class=\"wp-image-38576 lazyload\" title=\"Firebase Project Directory Structure\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-directories-structure.png\"><\/figure>\n\n\n\n<p>For an even deeper dive into mobile app development frameworks, you might be interested in reading<a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/developing-startup-mobile-app-flutter\"> <strong>Fundamental Guide for Developing Startup Mobile App with Flutter<\/strong><\/a> to understand the best practices for building scalable mobile apps.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 3 : Register the iOS app<\/strong><\/h4>\n\n\n\n<p>To register the iOS app, click on the Add app option from the dashboard screen and then click on the iOS icon from the available options. Then, on the next screen, provide the App Bundle ID, App Nickname, and App Store ID (optional). After adding the information, click the Register app button, download the <code>GoogleService-Info.plist<\/code> file, and copy it to the <code>.\/ios\/Runner<\/code> folder. If you\u2019re working with an<a href=\"https:\/\/mobisoftinfotech.com\/services\/ios-app-development-company\"> iOS app development company<\/a>, this will help streamline your process.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/add-firebase-to-ios.png\" alt=\" Integrate Firebase with iOS app\" class=\"wp-image-38577\" title=\"Add Firebase to Your iOS App\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20381%22%3E%3C%2Fsvg%3E\" alt=\" Integrate Firebase with iOS app\" class=\"wp-image-38577 lazyload\" title=\"Add Firebase to Your iOS App\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/add-firebase-to-ios.png\"><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/download-firebase-config.png\" alt=\"Download the Firebase configuration file\" class=\"wp-image-38578\" title=\"Download Firebase Config File\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20381%22%3E%3C%2Fsvg%3E\" alt=\"Download the Firebase configuration file\" class=\"wp-image-38578 lazyload\" title=\"Download Firebase Config File\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/download-firebase-config.png\"><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-config-directories.png\" alt=\" Firebase config files in local directories\" class=\"wp-image-38579\" title=\"Local Directories for Firebase Files\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20381%22%3E%3C%2Fsvg%3E\" alt=\" Firebase config files in local directories\" class=\"wp-image-38579 lazyload\" title=\"Local Directories for Firebase Files\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-config-directories.png\"><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 4 : Incorporate Firebase dependencies.<\/strong><\/h4>\n\n\n\n<p>Add the following necessary Firebase dependencies to the <code>dev_dependencies<\/code> section of the <code>pubspec.yaml<\/code> file. Next, run the <code>flutter pub get<\/code> command in the terminal to install the Firebase dependencies.<\/p>\n\n\n\n<p>dependencies:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">flutter<\/span>:\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-selector-tag\">sdk<\/span>: <span class=\"hljs-selector-tag\">flutter<\/span>\n\n&nbsp;<span class=\"hljs-selector-tag\">cupertino_icons<\/span>: ^1<span class=\"hljs-selector-class\">.0<\/span><span class=\"hljs-selector-class\">.8<\/span>\n\n&nbsp;<span class=\"hljs-selector-tag\">firebase_core<\/span>: ^3<span class=\"hljs-selector-class\">.12<\/span><span class=\"hljs-selector-class\">.1<\/span>\n\n&nbsp;<span class=\"hljs-selector-tag\">firebase_auth<\/span>: ^5<span class=\"hljs-selector-class\">.5<\/span><span class=\"hljs-selector-class\">.1<\/span>\n\n&nbsp;<span class=\"hljs-selector-tag\">google_sign_in<\/span>: ^6<span class=\"hljs-selector-class\">.3<\/span><span class=\"hljs-selector-class\">.0<\/span>\n\n&nbsp;<span class=\"hljs-selector-tag\">cloud_firestore<\/span>: ^5<span class=\"hljs-selector-class\">.6<\/span><span class=\"hljs-selector-class\">.5<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 5 : Initialize the Firebase<\/strong><\/h4>\n\n\n\n<p>Initialize the Firebase by adding the below line to your main.dart file.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">void<\/span> main() <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;WidgetsFlutterBinding.ensureInitialized();\n\n&nbsp;<span class=\"hljs-keyword\">await<\/span> Firebase.initializeApp();\n\n&nbsp;runApp(<span class=\"hljs-keyword\">const<\/span> MyApp());\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Here, we are done with the Firebase setup.<\/p>\n\n\n\n<p>After completing these steps, you&#8217;ll have a functional Firebase setup for your Flutter app. If you\u2019re exploring cross-platform mobile development, check out this<a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/cross-platform-app-development\"> <strong>Flutter vs. React Native vs. Xamarin: Which One to Choose for Cross-platform App Development?<\/strong><\/a> to help you choose the right technology for your project.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Integrate Firebase Authentication and Firebase Firestore into your Flutter application.<\/strong><\/h2>\n\n\n\n<p>Here, we are taking a task management example for an employee. First, we authenticate the employee through a signup process using the Firebase Authentication service.<\/p>\n\n\n\n<p>We provide a signup screen that allows employees to register by entering their name, email, and password. After signing up, an employee can log in to the app by entering their email and password on the login screen. We have also implemented Google Sign-In functionality to authenticate the employee.<\/p>\n\n\n\n<p>Once authenticated, employees can create tasks, view all tasks, modify task details, and remove tasks as needed.&nbsp; To implement such a workflow efficiently, partnering with a<a href=\"https:\/\/mobisoftinfotech.com\/services\/mobile-app-development-company\"> <strong>custom mobile application development company<\/strong><\/a> that specializes in backend integration is essential.&nbsp;<\/p>\n\n\n\n<p>We have designed a Home screen that displays a list of tasks added by the logged-in employee. At the bottom of the Home screen, we have added an \u201cAdd Task\u201d button that navigates the employee to the Add Task screen. On this Add Task screen, we have created a form to collect the task title, task description, and task owner information from the employee.&nbsp;&nbsp;<\/p>\n\n\n\n<p>The same screen is also used to update task details. We have also added two buttons and one profile icon on the app bar of the Home screen. One to refresh the task list and another to sign out the current employee, and the profile icon is to navigate users to the profile screen.<\/p>\n\n\n\n<p>Let&#8217;s move forward with the implementation by following the steps outlined below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Steps to Set up the Firebase Authentication<\/strong><\/h3>\n\n\n\n<p>We will provide two methods for authenticating end users: Sign-In with Google and custom user accounts created using an email and password.<\/p>\n\n\n\n<p>Before writing any code in your project, you need to enable Firebase authentication methods from the Firebase console. Navigate to the Authentication section in your Firebase console, then click on the Sign-in Method tab. We can see multiple sign-in methods on this tab, as shown in the screenshot below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/enable-firebase-authentication.png\" alt=\"Enable Firebase authentication options\" class=\"wp-image-38580\" title=\"Enable Authentication in Firebase\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20381%22%3E%3C%2Fsvg%3E\" alt=\"Enable Firebase authentication options\" class=\"wp-image-38580 lazyload\" title=\"Enable Authentication in Firebase\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/enable-firebase-authentication.png\"><\/figure>\n\n\n\n<p>This blog covers the implementation of Email\/Password login along with Google Sign-In. To activate the Email\/Password method, select the Email\/Password option under the Native providers section. Following the screenshot below, activate the option and click Save to proceed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"406\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-authentication-dashboard.png\" alt=\" Firebase authentication dashboard setup\" class=\"wp-image-38582\" title=\"Firebase Authentication Dashboard\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"406\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20406%22%3E%3C%2Fsvg%3E\" alt=\" Firebase authentication dashboard setup\" class=\"wp-image-38582 lazyload\" title=\"Firebase Authentication Dashboard\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-authentication-dashboard.png\"><\/figure>\n\n\n\n<p>In this way, you can enable the Email\/Password method. After this, to enable Google Sign-In, click on the Google option in the Additional providers section. As shown in the screenshot below, enable the switch and provide the support email address. You also need to provide the SHA1 key for Android when creating the Android application.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"468\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-sign-in-method.png\" alt=\"Configure sign-in method in Firebase auth\" class=\"wp-image-38581\" title=\"Set Up Sign-In Methods\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"468\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20468%22%3E%3C%2Fsvg%3E\" alt=\"Configure sign-in method in Firebase auth\" class=\"wp-image-38581 lazyload\" title=\"Set Up Sign-In Methods\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-sign-in-method.png\"><\/figure>\n\n\n\n<p>After entering all the required information, click on the save button. In this way you can enable both Email\/Password and Google Sign-In authentication methods on the Firebase console.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"326\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/verify-authentication-methods.png\" alt=\"Check if Google and Email auth are active\n\" class=\"wp-image-38583\" title=\"Verify Enabled Authentication Methods\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"326\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20326%22%3E%3C%2Fsvg%3E\" alt=\"Check if Google and Email auth are active\n\" class=\"wp-image-38583 lazyload\" title=\"Verify Enabled Authentication Methods\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/verify-authentication-methods.png\"><\/figure>\n\n\n\n<p>You can reconfirm if both methods are enabled or not, as shown in the above screenshot. Now we are ready to call the firebase authentication methods from our project.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Google Sign-In Functionality<\/strong><\/h3>\n\n\n\n<p>First we will see Sign-In with Google functionality. To sign in with Google, we have provided a <code>SignInwithGoogle<\/code> button on the login screen. By clicking on this button, we call the <code>signInWithGoogleButtonClicked()<\/code> method in which we call the <code>signInWithGoogle()<\/code> method from the <code>auth_service.dart<\/code> file, as shown below. Create a separate file named <code>auth_service.dart<\/code> and write all the functions related to authentication in it.&nbsp;<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">void<\/span> signInWithGoogleButtonClicked(BuildContext context) <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;final userCred = <span class=\"hljs-keyword\">await<\/span> AuthService().signInWithGoogle();\n\n&nbsp;<span class=\"hljs-keyword\">if<\/span> (userCred != <span class=\"hljs-literal\">null<\/span>) {\n\n&nbsp;&nbsp;&nbsp;Navigator.push(\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context,\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MaterialPageRoute(builder: <span class=\"hljs-function\">(<span class=\"hljs-params\">context<\/span>) =&gt;<\/span> <span class=\"hljs-keyword\">const<\/span> HomeScreen()),\n\n&nbsp;&nbsp;&nbsp;);\n\n&nbsp;}\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>As shown in the above method, we invoke the <code>signInWithGoogle()<\/code> function from the <code>auth_service.dart<\/code> file, as illustrated below, to obtain the UserCredential data. If the UserCredential data is not empty, the user has been successfully authenticated with Google, and we navigate the user to the home screen.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Future&lt;UserCredential?&gt; signInWithGoogle() <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;<span class=\"hljs-keyword\">try<\/span> {\n\n&nbsp;&nbsp;&nbsp;final googleUser = <span class=\"hljs-keyword\">await<\/span> GoogleSignIn().signIn();\n\n&nbsp;&nbsp;&nbsp;final googleAuth = <span class=\"hljs-keyword\">await<\/span> googleUser?.authentication;\n\n&nbsp;&nbsp;&nbsp;final cred = GoogleAuthProvider.credential(\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idToken: googleAuth?.idToken, <span class=\"hljs-attr\">accessToken<\/span>: googleAuth?.accessToken);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-keyword\">await<\/span> FirebaseAuth.instance.signInWithCredential(cred);\n\n&nbsp;} <span class=\"hljs-keyword\">catch<\/span> (e) {\n\n&nbsp;&nbsp;&nbsp;log(e.toString());\n\n&nbsp;}\n\n&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">null<\/span>;\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>We need to use the function <code>'FirebaseAuth.instance.signInWithCredential(cred)'<\/code> to sign in with Google Sign-In. You have to provide the <code>GoogleAuthProvider.credential<\/code> object, which can be generated by providing the Access Token and Google authentication token. These authentication token and access token can be obtained by using <code>GoogleSignIn().signIn()<\/code> and <code>GoogleSignIn().signIn().authentication<\/code>, respectively.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"375\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/google-sign-in-firebase.png\" alt=\"Implement Google sign-in with Firebase\" class=\"wp-image-38584\" title=\"Google Sign-In with Firebase\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"375\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20375%22%3E%3C%2Fsvg%3E\" alt=\"Implement Google sign-in with Firebase\" class=\"wp-image-38584 lazyload\" title=\"Google Sign-In with Firebase\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/google-sign-in-firebase.png\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Sign Up Using Email and Password<\/strong><\/h3>\n\n\n\n<p>To create a custom user by using email and password, we have developed a sign-up form to collect the user&#8217;s name, email, and password. After filling out the signup form, the user needs to click on the Sign up button. On the Sign up button click, we have called the <code>onSignupClicked()<\/code> method, in which we check the simple validations. If the validations are unsuccessful, we are showing a specific text message to the&nbsp; employee; otherwise, we invoke the <code>AuthService().createUserWithEmailAndPassword()<\/code> method from the <code>auth_service.dart<\/code> file. This function will return the User model if the user is created successfully on Firebase.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">void<\/span> signupButtonClicked(BuildContext context) <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;<span class=\"hljs-built_in\">String<\/span> email = emailController.text.toString().trim();\n\n&nbsp;<span class=\"hljs-built_in\">String<\/span> password = passwordController.text.toString().trim();\n\n&nbsp;<span class=\"hljs-keyword\">if<\/span> (performValidation(context, email, password)) {\n\n&nbsp;&nbsp;&nbsp;final user = <span class=\"hljs-keyword\">await<\/span> AuthService()\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.createUserWithEmailAndPassword(context, email, password);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">if<\/span> (user != <span class=\"hljs-literal\">null<\/span>) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Navigator.pop(context);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"User created successfully.\"<\/span>);\n\n&nbsp;&nbsp;&nbsp;}\n\n&nbsp;}\n\n}\n\nbool performValidation(BuildContext context, <span class=\"hljs-built_in\">String<\/span> email, <span class=\"hljs-built_in\">String<\/span> password) {\n\n&nbsp;<span class=\"hljs-keyword\">if<\/span> (email.isEmpty) {\n\n&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"Please enter email address.\"<\/span>);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">false<\/span>;\n\n&nbsp;} <span class=\"hljs-keyword\">else<\/span> <span class=\"hljs-keyword\">if<\/span> (password.isEmpty) {\n\n&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"Please enter password.\"<\/span>);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">false<\/span>;\n\n&nbsp;}\n\n&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">true<\/span>;\n\n}\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Implement a function named <code>createUserWithEmailAndPassword()<\/code> to facilitate the registration of new users.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Future&lt;User?&gt; createUserWithEmailAndPassword(\n\n   BuildContext context, <span class=\"hljs-built_in\">String<\/span> emailAddress, <span class=\"hljs-built_in\">String<\/span> password) <span class=\"hljs-keyword\">async<\/span> {\n\n <span class=\"hljs-keyword\">try<\/span> {\n\n   final credential =\n\n       <span class=\"hljs-keyword\">await<\/span> FirebaseAuth.instance.createUserWithEmailAndPassword(\n\n     email: emailAddress,\n\n     <span class=\"hljs-attr\">password<\/span>: password,\n\n   );\n\n   <span class=\"hljs-keyword\">return<\/span> credential.user;\n\n } on FirebaseAuthException <span class=\"hljs-keyword\">catch<\/span> (e) {\n\n   <span class=\"hljs-keyword\">if<\/span> (e.code == <span class=\"hljs-string\">'weak-password'<\/span>) {\n\n     CommonUtils.showToast(context, <span class=\"hljs-string\">'The password provided is too weak.'<\/span>);\n\n   } <span class=\"hljs-keyword\">else<\/span> <span class=\"hljs-keyword\">if<\/span> (e.code == <span class=\"hljs-string\">'email-already-in-use'<\/span>) {\n\n     CommonUtils.showToast(\n\n         context, <span class=\"hljs-string\">'The account already exists for this email.'<\/span>);\n\n   }\n\n } <span class=\"hljs-keyword\">catch<\/span> (e) {\n\n   print(e);\n\n }\n\n <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">null<\/span>;\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>FirebaseAuth.instance.createUserWithEmailAndPassword(<\/code>) method is utilized to register a new user using the given email and password. This will create a new user with the provided email and password. Firebase may throw exceptions like <code>'weak-password'<\/code>, <code>'email-already-in-use<\/code>&#8216; or any other exceptions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/mobisoftinfotech.com\/services\/mobile-app-development-company?utm_source=blog&amp;utm_medium=firebase-cloud-firestore-mobile-app-integration-cta1\"><noscript><img decoding=\"async\" width=\"855\" height=\"363\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-competitor-apps.png\" alt=\"Competitor advantage in mobile apps CTA banner\" class=\"wp-image-38595\" title=\"Stay Ahead \u2013 Build Better Apps Than Your Competitors\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"363\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20363%22%3E%3C%2Fsvg%3E\" alt=\"Competitor advantage in mobile apps CTA banner\" class=\"wp-image-38595 lazyload\" title=\"Stay Ahead \u2013 Build Better Apps Than Your Competitors\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-competitor-apps.png\"><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Sign In with Email and Password<\/strong><\/h3>\n\n\n\n<p>We have developed a login screen to verify the users registered with Firebase Authentication. We have provided 2 input fields to get the email and password from the user. Once the user has entered their email and password, they must click the &#8216;Sign In&#8217; button. On the Sign in button click, we have called the <code>onLoginClicked()<\/code> method, in which we check the empty string validation for both email and password. After validating the email and password, we called the <code>loginWithEmailAndPassword()<\/code> from the <code>auth_service.dart<\/code> file.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">void<\/span> loginButtonClicked(BuildContext context) <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;setState(() {\n\n&nbsp;&nbsp;&nbsp;isLoading = <span class=\"hljs-literal\">true<\/span>;\n\n&nbsp;});\n\n&nbsp;<span class=\"hljs-built_in\">String<\/span> email = emailController.text.toString().trim();\n\n&nbsp;<span class=\"hljs-built_in\">String<\/span> password = passwordController.text.toString().trim();\n\n&nbsp;<span class=\"hljs-keyword\">if<\/span> (performValidation(context, email, password)) {\n\n&nbsp;&nbsp;&nbsp;final user = <span class=\"hljs-keyword\">await<\/span> AuthService()\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.loginWithEmailAndPassword(context, email, password);\n\n&nbsp;&nbsp;&nbsp;setState(() {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isLoading = <span class=\"hljs-literal\">false<\/span>;\n\n&nbsp;&nbsp;&nbsp;});\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">if<\/span> (user != <span class=\"hljs-literal\">null<\/span>) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Navigator.pushAndRemoveUntil(\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context,\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MaterialPageRoute(builder: <span class=\"hljs-function\">(<span class=\"hljs-params\">context<\/span>) =&gt;<\/span> <span class=\"hljs-keyword\">const<\/span> HomeScreen()),\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Route&lt;dynamic&gt; route) =&gt; <span class=\"hljs-literal\">false<\/span>);\n\n&nbsp;&nbsp;&nbsp;}\n\n&nbsp;} <span class=\"hljs-keyword\">else<\/span> {\n\n&nbsp;&nbsp;&nbsp;setState(() {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isLoading = <span class=\"hljs-literal\">false<\/span>;\n\n&nbsp;&nbsp;&nbsp;});\n\n&nbsp;}\n\n}\n\nbool performValidation(BuildContext context, <span class=\"hljs-built_in\">String<\/span> email, <span class=\"hljs-built_in\">String<\/span> password) {\n\n&nbsp;<span class=\"hljs-keyword\">if<\/span> (email.isEmpty) {\n\n&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"Please enter email address.\"<\/span>);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">false<\/span>;\n\n&nbsp;} <span class=\"hljs-keyword\">else<\/span> <span class=\"hljs-keyword\">if<\/span> (password.isEmpty) {\n\n&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"Please enter password.\"<\/span>);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">false<\/span>;\n\n&nbsp;}\n\n&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">true<\/span>;\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Write a function <code>loginWithEmailAndPassword()<\/code> to sign in the user by using email and password as below in <code>auth_service.dart<\/code> file.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Future&lt;User?&gt; loginWithEmailAndPassword(\n\n&nbsp;&nbsp;&nbsp;BuildContext context, <span class=\"hljs-built_in\">String<\/span> emailAddress, <span class=\"hljs-built_in\">String<\/span> password) <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;<span class=\"hljs-keyword\">try<\/span> {\n\n&nbsp;&nbsp;&nbsp;final credential = <span class=\"hljs-keyword\">await<\/span> FirebaseAuth.instance\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.signInWithEmailAndPassword(email: emailAddress, <span class=\"hljs-attr\">password<\/span>: password);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> credential.user;\n\n&nbsp;} on FirebaseAuthException <span class=\"hljs-keyword\">catch<\/span> (e) {\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">if<\/span> (e.code == <span class=\"hljs-string\">'invalid-credential'<\/span>) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"Invalid credential. Please try again.\"<\/span>);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">null<\/span>;\n\n&nbsp;&nbsp;&nbsp;} <span class=\"hljs-keyword\">else<\/span> {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"Something went wrong.\"<\/span>);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">null<\/span>;\n\n&nbsp;&nbsp;&nbsp;}\n\n&nbsp;}\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Using the method <code>FirebaseAuth.instance.signInWithEmailAndPassword()<\/code>, the user will get authenticated and after validating the email and password, this method returns the \u2018User\u2019 data model. If the validation fails, an exception will be triggered, such as <code>'invalid-credential'<\/code> or a different error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Sign Out<\/strong><\/h3>\n\n\n\n<p>We need to ensure that the user is provided with the option to sign out. To sign out the currently logged-in user, we have provided the logout button on the home screen\u2019s App bar. When the user clicks on this logout button, the <code>_signOutButtonClicked()<\/code> method is invoked as shown below.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">_signOurButtonClicked() <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;<span class=\"hljs-keyword\">try<\/span> {\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">await<\/span> AuthService().signOut();\n\n&nbsp;&nbsp;&nbsp;DatabaseService().clearUID();\n\n&nbsp;&nbsp;&nbsp;Navigator.pushAndRemoveUntil(\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;context,\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MaterialPageRoute(builder: <span class=\"hljs-function\">(<span class=\"hljs-params\">context<\/span>) =&gt;<\/span> LoginScreen()),\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Route&lt;dynamic&gt; route) =&gt; <span class=\"hljs-literal\">false<\/span>);\n\n&nbsp;} <span class=\"hljs-keyword\">catch<\/span> (e) {\n\n&nbsp;&nbsp;&nbsp;log(e.toString());\n\n&nbsp;}\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>We invoked the <code>signOut()<\/code> method from the <code>auth_service.dart<\/code> file within this method. Next, we reset the uid variable to empty, which is declared in the DatabaseService.dart file, which stores the ID of the currently logged-in user. Following this, the user is redirected to the login screen. Define a function <code>signOut()<\/code> in the <code>auth_service.dart<\/code> file as follows:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Future&lt;<span class=\"hljs-keyword\">void<\/span>&gt; signOut() <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;<span class=\"hljs-keyword\">try<\/span> {\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">await<\/span> AuthService().signOut();\n\n&nbsp;} <span class=\"hljs-keyword\">catch<\/span> (e) {\n\n&nbsp;&nbsp;&nbsp;log(<span class=\"hljs-string\">\"Something went wrong\"<\/span>);\n\n&nbsp;}\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"375\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/email-password-firebase-login.png\" alt=\"Firebase Email and Password authentication\" class=\"wp-image-38585\" title=\"Email and Password Sign-In\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"375\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20375%22%3E%3C%2Fsvg%3E\" alt=\"Firebase Email and Password authentication\" class=\"wp-image-38585 lazyload\" title=\"Email and Password Sign-In\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/email-password-firebase-login.png\"><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"331\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/login-user-details.png\" alt=\"Fetch Firebase authenticated user info\" class=\"wp-image-38586\" title=\"Fetch Authenticated User Data\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"331\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20331%22%3E%3C%2Fsvg%3E\" alt=\"Fetch Firebase authenticated user info\" class=\"wp-image-38586 lazyload\" title=\"Fetch Authenticated User Data\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/login-user-details.png\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Steps to Implement the Firebase Firestore<\/strong><\/h3>\n\n\n\n<p>Before starting any operations related to Firebase Firestore, we need to create the database in Firebase Firestore. To do this, navigate to the Firestore Database screen by clicking on the Firestore Database option under the Build section in the left menu, as shown in the screenshot below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-integration-steps.png\" alt=\" Steps to integrate Firebase Cloud Firestore\" class=\"wp-image-38587\" title=\" Firebase Firestore Integration Steps\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"381\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20381%22%3E%3C%2Fsvg%3E\" alt=\" Steps to integrate Firebase Cloud Firestore\" class=\"wp-image-38587 lazyload\" title=\" Firebase Firestore Integration Steps\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-integration-steps.png\"><\/figure>\n\n\n\n<p>Click Create database to initiate the first step in setting up your database. In step 1, the Database ID field will be disabled, as its default value is set to &#8220;(default)&#8221;. Next, you need to select the location of the Cloud Firestore database. Choose the location carefully, as it cannot be changed once selected. After selecting the location, click the Next button, as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"508\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/create-firestore-database.png\" alt=\"Create a Firestore database in Firebase\" class=\"wp-image-38588\" title=\"Create Firestore Database\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"508\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20508%22%3E%3C%2Fsvg%3E\" alt=\"Create a Firestore database in Firebase\" class=\"wp-image-38588 lazyload\" title=\"Create Firestore Database\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/create-firestore-database.png\"><\/figure>\n\n\n\n<p>In Step 2, we need to define secure rules for read and write operations. Two modes are provided: production mode and test mode. If we select production mode, all read and write operations will be restricted for third-party users. If we select test mode, we need to define our own rules to secure the data during read and write operations. We will discuss Firestore rules in more detail later in this blog. For the demonstration, we will select test mode and complete the database creation process by tapping the Next button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"508\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firestore-security-rules.png\" alt=\" Set Firebase Firestore security rules\" class=\"wp-image-38589\" title=\"Firestore Security Rules\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"508\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20508%22%3E%3C%2Fsvg%3E\" alt=\" Set Firebase Firestore security rules\" class=\"wp-image-38589 lazyload\" title=\"Firestore Security Rules\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firestore-security-rules.png\"><\/figure>\n\n\n\n<p>After creating the database on firebase firestore we are ready to call the read and write operations from mobile. Let\u2019s get started.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"357\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/what-is-cloud-firestore.png\" alt=\"Firebase Cloud Firestore NoSQL database\" class=\"wp-image-38590\" title=\" What Is Cloud Firestore?\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"357\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20357%22%3E%3C%2Fsvg%3E\" alt=\"Firebase Cloud Firestore NoSQL database\" class=\"wp-image-38590 lazyload\" title=\" What Is Cloud Firestore?\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/what-is-cloud-firestore.png\"><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Insert records into the Firestore database<\/strong><\/h4>\n\n\n\n<p>To collect the data from the user, we create an Add Task screen and on this screen, we design the form, in which we get some user inputs like task title, task description, and the owner of the task. Once the necessary information has been entered, the user will click on the Add button. Upon clicking the Add button, the <code>insertRecord()<\/code> function is triggered, beginning with a validation of the form to ensure there are no empty fields by invoking <code>_checkValidations(context)<\/code>. Feel free to implement your own validation rules according to your needs. After validating the form, we collect the input values and link them to the collection. Next, we need to invoke the <code>insertTask()<\/code> method from the database_service.dart file. Create a separate file named <code>database_service.dart<\/code> and write all the functions related to Firebase Firestore in it. The <code>insertRecord()<\/code> method is also used to update records by checking the task.id. We will explore the record update functionality later in this blog.&nbsp;<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">insertRecord(BuildContext context) <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;<span class=\"hljs-built_in\">String<\/span> message = <span class=\"hljs-string\">''<\/span>;\n\n&nbsp;<span class=\"hljs-keyword\">if<\/span> (_checkValidations(context)) {\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">if<\/span> (widget.task.id == <span class=\"hljs-literal\">null<\/span>) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message = <span class=\"hljs-keyword\">await<\/span> DatabaseService().insertTask(_getTask());\n\n&nbsp;&nbsp;&nbsp;} <span class=\"hljs-keyword\">else<\/span> {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message =\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">await<\/span> DatabaseService().updateTask(widget.task.id!, _getTask());\n\n&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, message);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">if<\/span> (widget.task.id == <span class=\"hljs-literal\">null<\/span>) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_clearInputFields();\n\n&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;Navigator.pop(context);\n\n&nbsp;}\n\n}\n\n_checkValidations(BuildContext context) {\n\n&nbsp;<span class=\"hljs-keyword\">if<\/span> (nameController.text.toString().isEmpty) {\n\n&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"Please enter task name\"<\/span>);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">false<\/span>;\n\n&nbsp;} <span class=\"hljs-keyword\">else<\/span> <span class=\"hljs-keyword\">if<\/span> (emailController.text.toString().isEmpty) {\n\n&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"Please enter task description\"<\/span>);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">false<\/span>;\n\n&nbsp;} <span class=\"hljs-keyword\">else<\/span> <span class=\"hljs-keyword\">if<\/span> (phoneController.text.toString().isEmpty) {\n\n&nbsp;&nbsp;&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"Please enter task owner\"<\/span>);\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">false<\/span>;\n\n&nbsp;}\n\n&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-literal\">true<\/span>;\n\n}\n\n_getTask() {\n\n&nbsp;<span class=\"hljs-keyword\">return<\/span> Task(\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;taskName: nameController.text.toString().trim(),\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-attr\">description<\/span>: emailController.text.toString().trim(),\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-attr\">owner<\/span>: phoneController.text.toString().trim());\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>As shown in the above method, we invoke the <code>.insertTask()<\/code> function from the <code>database_service.dart<\/code> file which is used to store the data on the firestore database.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Future&lt;<span class=\"hljs-built_in\">String<\/span>&gt; insertTask(Task task) <span class=\"hljs-keyword\">async<\/span> \n\n&nbsp;<span class=\"hljs-keyword\">try<\/span> {\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">await<\/span> FirebaseFirestore.instance\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.collection(<span class=\"hljs-string\">\"user\"<\/span>)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.doc(uid)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.collection(<span class=\"hljs-string\">\"task\"<\/span>)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.add(task.toMap());\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-string\">\"Record added successfully\"<\/span>;\n\n&nbsp;} <span class=\"hljs-keyword\">catch<\/span> (e) {\n\n&nbsp;&nbsp;&nbsp;log(e.toString());\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">if<\/span> (e is FirebaseException) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> e.message ?? <span class=\"hljs-string\">\"\"<\/span>;\n\n&nbsp;&nbsp;&nbsp;} <span class=\"hljs-keyword\">else<\/span> {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> e.toString();\n\n&nbsp;&nbsp;&nbsp;}\n\n&nbsp;}\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>To insert records, use the <code>.add()<\/code> method and pass the data to this method. The data should be provided in a Map format. Before invoking .add() method, provide the collection name to the <code>.collection()<\/code> method. Then, use the logged-in user ID as the document ID to store the records against the current user.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"340\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/insert-data-firestore.png\" alt=\"Add data to Firebase Firestore\" class=\"wp-image-38591\" title=\"Insert Data into Firestore\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"340\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20340%22%3E%3C%2Fsvg%3E\" alt=\"Add data to Firebase Firestore\" class=\"wp-image-38591 lazyload\" title=\"Insert Data into Firestore\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/insert-data-firestore.png\"><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Fetch records from the Firestore database<\/strong><\/h4>\n\n\n\n<p>To show all the records inserted in the firestore database, we have designed a screen with ListView widget. To fetch the records from the firestore database, we invoked the <code>_fetchTaskList()<\/code> method when the screen is initialized for the first time and also when the Refresh button is pressed. In this method we invoke the <code>fetchTasks()<\/code> method from the <code>database_service.dart<\/code> file.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Future&lt;<span class=\"hljs-keyword\">void<\/span>&gt; _fetchTaskList() <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;final tasks = <span class=\"hljs-keyword\">await<\/span> DatabaseService().fetchTasks();\n\n&nbsp;setState(() {\n\n&nbsp;&nbsp;&nbsp;_taskList = tasks;\n\n&nbsp;});\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>&nbsp;To fetch the records from the database, create a function fetchTasks() like below<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-14\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Future&lt;List&lt;Task&gt;&gt; fetchTasks() <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;<span class=\"hljs-keyword\">try<\/span> {\n\n&nbsp;&nbsp;&nbsp;final QuerySnapshot snapshot = <span class=\"hljs-keyword\">await<\/span> FirebaseFirestore.instance\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.collection(<span class=\"hljs-string\">\"user\"<\/span>)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.doc(uid)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.collection(<span class=\"hljs-string\">\"task\"<\/span>)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.get();\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> snapshot.docs.map((doc) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;final id = doc.id;\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;final data = doc.data();\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">if<\/span> (data != <span class=\"hljs-literal\">null<\/span>) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Task task = Task.fromMap(data <span class=\"hljs-keyword\">as<\/span> <span class=\"hljs-built_in\">Map<\/span>&lt;<span class=\"hljs-built_in\">String<\/span>, dynamic&gt;);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;task.id = id;\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> task;\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <span class=\"hljs-keyword\">else<\/span> {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> Task(id: <span class=\"hljs-string\">''<\/span>, <span class=\"hljs-attr\">taskName<\/span>: <span class=\"hljs-string\">''<\/span>, <span class=\"hljs-attr\">description<\/span>: <span class=\"hljs-string\">''<\/span>, <span class=\"hljs-attr\">owner<\/span>: <span class=\"hljs-string\">''<\/span>);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;&nbsp;}).toList();\n\n&nbsp;} <span class=\"hljs-keyword\">catch<\/span> (e) {\n\n&nbsp;&nbsp;&nbsp;log(e.toString());\n\n&nbsp;}\n\n&nbsp;<span class=\"hljs-keyword\">return<\/span> &#091;];\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-14\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>You can use the <code>get()<\/code> method from <code>FirebaseFirestore.instance.collection(<\/code>) to retrieve the data. You need to provide the logged-in user ID as document ID to the collection function to fetch the logged-in user&#8217;s data.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"281\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/fetch-firestore-data.png\" alt=\"Retrieve records from the Firestore database\" class=\"wp-image-38592\" title=\"Fetch Data from Firestore\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"281\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20281%22%3E%3C%2Fsvg%3E\" alt=\"Retrieve records from the Firestore database\" class=\"wp-image-38592 lazyload\" title=\"Fetch Data from Firestore\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/fetch-firestore-data.png\"><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Update records on the Firestore database<\/strong><\/h4>\n\n\n\n<p>To update the specific record, we have added the Edit button on each list item. When the Edit button is clicked, we redirect the user to the Add Task screen, providing the details of the selected task. We have used the same screen to add and update the records. After updating the required data, the user can click on the Update button. On the Update button click, we have called the same <code>insertRecord()<\/code> method, which we called for the Add records functionality in Step 1.<\/p>\n\n\n\n<p>To update the specific record on the firestore database, we created the below function in <code>database_service.dart<\/code> file as below.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-15\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Future&lt;<span class=\"hljs-built_in\">String<\/span>&gt; updateTask(<span class=\"hljs-built_in\">String<\/span> documentId, Task task) <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;<span class=\"hljs-keyword\">try<\/span> {\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">await<\/span> FirebaseFirestore.instance\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.collection(<span class=\"hljs-string\">\"user\"<\/span>)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.doc(uid)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.collection(<span class=\"hljs-string\">\"task\"<\/span>)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.doc(documentId)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.update(task.toMap());\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-string\">\"Record updated successfully\"<\/span>;\n\n&nbsp;} <span class=\"hljs-keyword\">catch<\/span> (e) {\n\n&nbsp;&nbsp;&nbsp;log(e.toString());\n\n&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">if<\/span> (e is FirebaseException) {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> e.message ?? <span class=\"hljs-string\">\"\"<\/span>;\n\n&nbsp;&nbsp;&nbsp;} <span class=\"hljs-keyword\">else<\/span> {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class=\"hljs-keyword\">return<\/span> e.toString();\n\n&nbsp;&nbsp;&nbsp;}\n\n&nbsp;}\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-15\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>You can update a specific record by providing the document ID. You can use the <code>.update(<\/code>) method to update the record. Furthermore, it is essential to specify the accurate collection names where this record has been stored.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"332\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/update-records-firestore.png\" alt=\"Update Firestore database entries\" class=\"wp-image-38593\" title=\"Update Firestore Records\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"332\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20332%22%3E%3C%2Fsvg%3E\" alt=\"Update Firestore database entries\" class=\"wp-image-38593 lazyload\" title=\"Update Firestore Records\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/update-records-firestore.png\"><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Delete records from Firestore database<\/strong><\/h4>\n\n\n\n<p>We have provided a Delete button for each item on the list to remove the specified record from the Firestore database. When a user clicks on the Delete button, we call the <code>_onDeleteButtonClicked(int index)<\/code> method by passing the index of the list item. In this method, we call the <code>.deleteTask(String documentId)<\/code> method from the<code> database_service.dart<\/code> file. We also pass the document ID to this method.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-16\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">_onDeleteButtonClicked(int index) {\n\n&nbsp;DatabaseService().deleteTask(_taskList!&#091;index].id ?? <span class=\"hljs-string\">\"\"<\/span>);\n\n&nbsp;CommonUtils.showToast(context, <span class=\"hljs-string\">\"Record deleted successfully\"<\/span>);\n\n&nbsp;_fetchTaskList();\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-16\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Create a deleteTask() method in database_service.dart as shown below<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-17\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">Future&lt;<span class=\"hljs-keyword\">void<\/span>&gt; deleteTask(<span class=\"hljs-built_in\">String<\/span> documentId) <span class=\"hljs-keyword\">async<\/span> {\n\n&nbsp;<span class=\"hljs-keyword\">try<\/span> {\n\n&nbsp;&nbsp;&nbsp;FirebaseFirestore.instance\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.collection(<span class=\"hljs-string\">\"user\"<\/span>)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.doc(uid)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.collection(<span class=\"hljs-string\">\"task\"<\/span>)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.doc(documentId)\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.delete();\n\n&nbsp;} <span class=\"hljs-keyword\">catch<\/span> (e) {\n\n&nbsp;&nbsp;&nbsp;log(e.toString());\n\n&nbsp;}\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-17\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>You can delete specific records by providing the document ID. To delete the record, you can use the <code>.delete()<\/code> method of <code>FirebaseFirestore.instance<\/code>. Furthermore, it is essential to specify the accurate collection names where this record has been stored.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"335\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/delete-data-firestore.png\" alt=\" Delete data from the Firestore database\" class=\"wp-image-38594\" title=\"Delete Firestore Records\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"335\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20335%22%3E%3C%2Fsvg%3E\" alt=\" Delete data from the Firestore database\" class=\"wp-image-38594 lazyload\" title=\"Delete Firestore Records\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/delete-data-firestore.png\"><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Log in user details<\/strong><\/h4>\n\n\n\n<p>We are able to retrieve details of the currently logged-in user, including their display name, email, phone number, photo URL, and other information. In this blog, we created a straightforward profile screen showing only the email address of the logged-in user. Feel free to customize the profile screen to suit your specific needs. To fetch the email address, we have written a function in database_service.dart file as below.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-18\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-built_in\">String<\/span> loginUserName() {\n\n&nbsp;<span class=\"hljs-keyword\">return<\/span> FirebaseAuth.instance.currentUser?.email\n\n&nbsp;?? <span class=\"hljs-string\">\"\"<\/span>;\n\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-18\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\"><strong>How to set the Firestore Rules<\/strong><\/h2>\n\n\n\n<p><strong>Firebase rules<\/strong> safeguard against unauthorized access by enforcing security measures. By using the <strong>Firestore rules<\/strong>, only authorized users can access the data. You can provide the read and write access to the users by defining the rules.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Steps to Add Firebase Rules<\/strong><\/h2>\n\n\n\n<p><strong>Step 1: <\/strong>Go to the Firebase Console and click on your project.<br><strong>Step 2: <\/strong>From the menu on the left side, inside the Build section, select the Firestore Database option.<br><strong>Step 3: <\/strong>Click on the second tab of \u2018Rules\u2019.<br><strong>Step 4: <\/strong>Define your own rules according to your specific requirements.<br><strong>Step 5: <\/strong>After writing rules, you can click on the \u2018Publish\u2019 button to apply these rules.&nbsp;<\/p>\n\n\n\n<p>We have added the following rules: Only logged-in users can add or update records, and the email ID of a logged-in user must match the allowed domain. Here for the demonstration purpose, we only allow the domain &#8216;testdomain.com&#8217;. You can change this domain as per your need.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><noscript><img decoding=\"async\" width=\"855\" height=\"347\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/steps-to-add-firebase-firestore-rules.png\" alt=\"Adding Firebase rules to secure Firestore database access\" class=\"wp-image-38618\" title=\"Steps to Add Firebase Firestore Security Rules for Mobile App Integration\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"347\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20347%22%3E%3C%2Fsvg%3E\" alt=\"Adding Firebase rules to secure Firestore database access\" class=\"wp-image-38618 lazyload\" title=\"Steps to Add Firebase Firestore Security Rules for Mobile App Integration\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/steps-to-add-firebase-firestore-rules.png\"><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Test your application<\/strong><\/h2>\n\n\n\n<p><strong>&#8211; <\/strong>To test the authentication feature, attempt to register and log in using various email addresses.<\/p>\n\n\n\n<p>&#8211; Also test the Google Sign-In functionality.<\/p>\n\n\n\n<p>&#8211; Try to add multiple records to test the Firestore database. Also check if data is getting stored or not against the logged-in user.<\/p>\n\n\n\n<p>&#8211; Do the CRUD operations to test the other functionalities too.<\/p>\n\n\n\n<p>&#8211; Evaluate the Firestore rules by trying to access them with unapproved users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion&nbsp;<\/strong><\/h2>\n\n\n\n<p>This blog will guide you through the process of setting up Firebase Authentication and Firebase Firestore in<strong> <\/strong><a href=\"https:\/\/mobisoftinfotech.com\/services\/flutter-consulting-development\">Flutter services<\/a>, as well as how to securely store and manage your data. To download the source code, please visit the <a href=\"https:\/\/github.com\/mobisoftinfotech\/flutter-firebase-integration\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub<\/a> repository here. You can explore the code and follow along with the steps mentioned in this guide.<\/p>\n\n\n\n<p><strong>Note:<\/strong> Before running the application, make sure to add the google-services.json file to the Android project and the GoogleServices-Info.plist file to the iOS project.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/mobisoftinfotech.com\/contact-us?utm_source=blog&amp;utm_medium=firebase-cloud-firestore-mobile-app-integration-cta2\"><noscript><img decoding=\"async\" width=\"855\" height=\"363\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-dream-app.png\" alt=\" Dream app development CTA banner\" class=\"wp-image-38596\" title=\"Build Your Dream App with Expert Firebase Integration\"><\/noscript><img decoding=\"async\" width=\"855\" height=\"363\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20855%20363%22%3E%3C%2Fsvg%3E\" alt=\" Dream app development CTA banner\" class=\"wp-image-38596 lazyload\" title=\"Build Your Dream App with Expert Firebase Integration\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-dream-app.png\"><\/a><\/figure>\n\n\n<div class=\"related-posts-section\"><h2>Related Posts<\/h2><ul class=\"related-posts-list\"><li><a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/react-file-uploader-progress-bar-nodejs-typescript\">React Tutorial: Build a React File Uploader Component with a Progress Bar using React, NodeJS, and TypeScript<\/a><\/li><li><a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/flutter-charts-tutorial-6-types-with-code-samples\">Flutter Charts: Hands On Tutorial For 6 Different Types Of Charts With Code Samples<\/a><\/li><li><a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/mobile-app-development-partner-startups\">Mobile App Development: How to Choose the Right App Development Partner for Your Startup<\/a><\/li><li><a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/fitness-app-development-trends-stats-success-stories\">The Ultimate Guide to Fitness App Development: Trends, Stats &amp; Success Stories<\/a><\/li><li><a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/react-native-swiftui-embed-screen\">React Native + SwiftUI Tutorial: How to Embed a SwiftUI Screen in Your React Native App<\/a><\/li><li><a href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/apple-intelligence-apps-ios-26-on-device-ai-guide\">Building Apple Intelligence Apps on iOS 26: A Complete Guide to On-Device AI with Foundation Models<\/a><\/li><\/ul><\/div>\n\n\n<div class=\"modern-author-card\">\n    <div class=\"author-card-content\">\n        <div class=\"author-info-section\">\n            <div class=\"author-avatar\">\n                <noscript><img decoding=\"async\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/chetan-patil-author.png\" alt=\"Chetan Patil\"><\/noscript><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"Chetan Patil\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/chetan-patil-author.png\" class=\" lazyload\">\n            <\/div>\n            <div class=\"author-details\">\n                <h3 class=\"author-name\">Chetan Patil<\/h3>\n                <p class=\"author-title\">Senior Software Engineer<\/p>\n                <a href=\"javascript:void(0);\" class=\"read-more-link read-more-btn\" onclick=\"toggleAuthorBio(this); return false;\">Read more <noscript><img decoding=\"async\" src=\"\/assets\/images\/blog\/Vector.png\" alt=\"expand\" class=\"read-more-arrow down-arrow\"><\/noscript><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"expand\" class=\"read-more-arrow down-arrow lazyload\" data-src=\"\/assets\/images\/blog\/Vector.png\"><\/a>\n                <div class=\"author-bio-expanded\">\n                    <p>Chetan Patil is Senior Software Engineer in <a href=\"https:\/\/mobisoftinfotech.com\">Mobisoft Infotech<\/a> with overall 10 years of experience in designing, building, and optimising high-performance mobile apps for Android and iOS platforms. He is skilled in both native and cross-platform frameworks like Kotlin, Java, Flutter, React Native. Passionate about delivering seamless, user-centric solutions and he is deeply committed to continuous learning, constantly exploring new technologies, tools, framework.<\/p>\n                    <div class=\"author-social-links\"><div class=\"social-icon\"><a href=\"https:\/\/www.linkedin.com\/in\/chetan-patil-43511b95\" target=\"_blank\" rel=\"nofollow noopener\"><i class=\"icon-sprite linkedin\"><\/i><\/a><\/div><\/div>\n                    <a href=\"javascript:void(0);\" class=\"read-more-link read-less-btn\" onclick=\"toggleAuthorBio(this); return false;\" style=\"display: none;\">Read less <noscript><img decoding=\"async\" src=\"\/assets\/images\/blog\/Vector.png\" alt=\"collapse\" class=\"read-more-arrow up-arrow\"><\/noscript><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"collapse\" class=\"read-more-arrow up-arrow lazyload\" data-src=\"\/assets\/images\/blog\/Vector.png\"><\/a>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"share-section\">\n            <span class=\"share-label\">Share Article<\/span>\n            <div class=\"social-share-buttons\">\n                <a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fmobisoftinfotech.com%2Fresources%2Fblog%2Fapp-development%2Ffirebase-cloud-firestore-mobile-app-integration\" target=\"_blank\" class=\"share-btn facebook-share\"><i class=\"fa fa-facebook-f\"><\/i><\/a>\n                <a href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=https%3A%2F%2Fmobisoftinfotech.com%2Fresources%2Fblog%2Fapp-development%2Ffirebase-cloud-firestore-mobile-app-integration\" target=\"_blank\" class=\"share-btn linkedin-share\"><i class=\"fa fa-linkedin\"><\/i><\/a>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n\n\n<style>\nspan.hljs-selector-tag {\n    font-weight: normal;\n}\n\nspan.hljs-keyword {\n    font-weight: normal;\n}span.hljs-selector-tag {\n    font-weight: normal;\n}\n\nspan.hljs-keyword {\n    font-weight: normal;\n}\nh3.wp-block-heading {\n   font-size:22px;\n}\nh4.wp-block-heading {\n   font-size:20px;\n}\n@media only screen and (max-width: 991px) {\n    .post-content li {\n       padding-left: 25px;\n    }\n    .post-content li:before {\n        content: '';\n         width: 9px;\n        height: 9px;\n        background-color: #0d265c;\n        border-radius: 50%;\n        position: absolute;\n        left: 0px;\n        top: 12px;\n    }\n}\n<\/style>\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"Article\",\n  \"mainEntityOfPage\": {\n    \"@type\": \"WebPage\",\n    \"@id\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\"\n  },\n  \"headline\": \"Step-by-Step Guide to Integrating Firebase Cloud Firestore into Your Mobile App\",\n  \"description\": \"Learn to integrate Firebase Cloud Firestore into your mobile app with real-time sync, offline access, and secure data handling in this easy step-by-step guide.\",\n  \"image\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png\",\n  \"author\": {\n    \"@type\": \"Person\",\n    \"name\": \"Chetan Patil\",\n    \"description\": \"Chetan Patil is a Senior Software Engineer in Mobisoft Infotech with overall 10 years of experience in designing, building, and optimizing high-performance mobile apps for Android and iOS platforms. He is skilled in both native and cross-platform frameworks like Kotlin, Java, Flutter, React Native. Passionate about delivering seamless, user-centric solutions, and he is deeply committed to continuous learning, constantly exploring new technologies, tools, frameworks.\"\n  },\n  \"publisher\": {\n    \"@type\": \"Organization\",\n    \"name\": \"Mobisoft Infotech\",\n    \"logo\": {\n      \"@type\": \"ImageObject\",\n      \"url\": \"https:\/\/mobisoftinfotech.com\/assets\/images\/mshomepage\/MI_Logo-white.svg\",\n      \"width\": 600,\n      \"height\": 600\n    }\n  },\n  \"datePublished\": \"2025-05-14\",\n  \"dateModified\": \"2025-05-14\"\n}\n<\/script>\n<script type=\"application\/ld+json\">\n{\n    \"@context\": \"https:\/\/schema.org\",\n    \"@type\": \"LocalBusiness\",\n    \"name\": \"Mobisoft Infotech\",\n    \"url\": \"https:\/\/mobisoftinfotech.com\",\n    \"logo\": \"https:\/\/mobisoftinfotech.com\/assets\/images\/mshomepage\/MI_Logo-white.svg\",\n    \"description\": \"Mobisoft Infotech specializes in custom software development and digital solutions.\",\n    \"address\": {\n        \"@type\": \"PostalAddress\",\n        \"streetAddress\": \"5718 Westheimer Rd Suite 1000\",\n        \"addressLocality\": \"Houston\",\n        \"addressRegion\": \"TX\",\n        \"postalCode\": \"77057\",\n        \"addressCountry\": \"USA\"\n    },\n    \"contactPoint\": [{\n        \"@type\": \"ContactPoint\",\n        \"telephone\": \"+1-855-572-2777\",\n        \"contactType\": \"Customer Service\",\n        \"areaServed\": [\"USA\", \"Worldwide\"],\n        \"availableLanguage\": [\"English\"]\n    }],\n    \"sameAs\": [\n        \"https:\/\/www.facebook.com\/pages\/Mobisoft-Infotech\/131035500270720\",\n        \"https:\/\/x.com\/MobisoftInfo\",\n        \"https:\/\/www.linkedin.com\/company\/mobisoft-infotech\",\n        \"https:\/\/in.pinterest.com\/mobisoftinfotech\/\",\n        \"https:\/\/www.instagram.com\/mobisoftinfotech\/\",\n        \"https:\/\/github.com\/MobisoftInfotech\",\n        \"https:\/\/www.behance.net\/MobisoftInfotech\",\n        \"https:\/\/www.youtube.com\/channel\/UCtwuTXKUXFX7k0NSYhsMeTg\"\n    ]\n}\n<\/script>\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"Organization\",\n  \"name\": \"Mobisoft Infotech\",\n  \"url\": \"https:\/\/mobisoftinfotech.com\/\",\n  \"logo\": \"https:\/\/mobisoftinfotech.com\/assets\/images\/MI_Logo.svg\",\n  \"sameAs\": [\n    \"https:\/\/www.facebook.com\/pages\/Mobisoft-Infotech\/131035500270720\",\n    \"https:\/\/twitter.com\/MobisoftInfo\",\n    \"https:\/\/www.instagram.com\/mobisoftinfotech\/\",\n    \"https:\/\/www.youtube.com\/channel\/UCtwuTXKUXFX7k0NSYhsMeTg\",\n    \"https:\/\/www.linkedin.com\/company\/mobisoft-infotech\",\n    \"https:\/\/in.pinterest.com\/mobisoftinfotech\/\",\n    \"https:\/\/github.com\/MobisoftInfotech\"\n  ],\n  \"contactPoint\": [\n    {\n      \"@type\": \"ContactPoint\",\n      \"telephone\": \"+1-855-572-2777\",\n      \"contactType\": \"Customer Service\",\n      \"areaServed\": \"US\",\n      \"availableLanguage\": [\"English\"]\n    },\n    {\n      \"@type\": \"ContactPoint\",\n      \"telephone\": \"+91-858-600-8627\",\n      \"contactType\": \"Customer Service\",\n      \"areaServed\": \"IN\",\n      \"availableLanguage\": [\"English\"]\n    }\n  ]\n}\n<\/script>\n<script type=\"application\/ld+json\">\n    [\n    {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/create-firebase-project.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Create a Firebase Project\",\n            \"caption\": \"Start by creating a Firebase project in the Firebase console\",\n            \"description\": \"Begin your Firebase Firestore integration by creating a new project in the Firebase console.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/create-firebase-project.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/start-firebase-project.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Start a New Firebase Project\",\n            \"caption\": \"Set up a Firebase project to manage backend services\",\n            \"description\": \"Start building your app\u2019s backend by initiating a Firebase project setup.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/start-firebase-project.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/register-android-app.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Register Your Android App with Firebase\",\n            \"caption\": \"Add your Android package name in Firebase setup\",\n            \"description\": \"Register your Android app in Firebase to enable SDK integration and authentication.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/register-android-app.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/add-firebase-to-android.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Add Firebase to Your Android App\",\n            \"caption\": \"Integrate Firebase SDK and configuration into Android Studio\",\n            \"description\": \"Integrate Firebase Cloud Firestore into your Android app with configuration and SDK setup.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/add-firebase-to-android.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-app-registration.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Firebase App Registration\",\n            \"caption\": \"Complete app registration to activate Firebase services\",\n            \"description\": \"Ensure your app is registered correctly in Firebase to start using Firestore features.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-app-registration.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-directories-structure.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Firebase Project Directory Structure\",\n            \"caption\": \"Explore configuration directories created after setup\",\n            \"description\": \"Understand Firebase directories and where configuration files are placed after integration.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-directories-structure.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/add-firebase-to-ios.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Add Firebase to Your iOS App\",\n            \"caption\": \"Use Swift and Firebase SDK to link your iOS app\",\n            \"description\": \"Register and configure your Apple app using Firebase Firestore Swift integration.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/add-firebase-to-ios.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/download-firebase-config.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Download Firebase Config File\",\n            \"caption\": \"Retrieve the google-services.json or .plist file for app integration\",\n            \"description\": \" Download the Firebase config file to complete app SDK setup on Android or iOS.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/download-firebase-config.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-config-directories.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Local Directories for Firebase Files\",\n            \"caption\": \"Locate downloaded Firebase config files in app structure\",\n            \"description\": \" Ensure correct placement of Firebase configuration files in app directories.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-config-directories.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/enable-firebase-authentication.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Enable Authentication in Firebase\",\n            \"caption\": \"Activate Email, Password, and Google sign-in methods\",\n            \"description\": \"Configure and enable multiple Firebase authentication methods for your app.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/enable-firebase-authentication.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-sign-in-method.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Set Up Sign-In Methods\",\n            \"caption\": \"Choose appropriate sign-in providers like Email and Google\",\n            \"description\": \"Set up secure and scalable sign-in methods using Firebase authentication.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-sign-in-method.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-authentication-dashboard.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Firebase Authentication Dashboard\",\n            \"caption\": \"Manage user authentication settings from the console\",\n            \"description\": \"Handle all user authentication and security rules from the Firebase console.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-authentication-dashboard.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/verify-authentication-methods.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Verify Enabled Authentication Methods\",\n            \"caption\": \"Confirm both Email and Google sign-in are active\",\n            \"description\": \"Double-check active Firebase authentication methods to ensure login readiness.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/verify-authentication-methods.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/google-sign-in-firebase.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Google Sign-In with Firebase\",\n            \"caption\": \"Allow users to log in using Google credentials\",\n            \"description\": \"Enable seamless user experience with Firebase Google Sign-In integration.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/google-sign-in-firebase.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/email-password-firebase-login.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Email and Password Sign-In\",\n            \"caption\": \"Traditional user login using Firebase authentication\",\n            \"description\": \"Secure your app with Firebase Email and Password login functionality.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/email-password-firebase-login.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/insert-data-firestore.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Insert Data into Firestore\",\n            \"caption\": \"Perform Firestore CRUD operations for data insertion\",\n            \"description\": \"Learn how to insert records in Firestore using Firebase Firestore Flutter\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/insert-data-firestore.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/update-records-firestore.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Update Firestore Records\",\n            \"caption\": \"Modify data with Firestore CRUD operations\",\n            \"description\": \"Implement Firestore CRUD operations to update records in your database securely.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/update-records-firestore.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/delete-data-firestore.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Delete Firestore Records\",\n            \"caption\": \"Remove records using Firestore CRUD logic\",\n            \"description\": \"Learn how to delete specific documents in your Firestore database programmatically.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/delete-data-firestore.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-integration-steps.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Firebase Firestore Integration Steps\",\n            \"caption\": \"A comprehensive checklist to implement Firestore\",\n            \"description\": \"Follow this structured guide to integrate Firebase Cloud Firestore into your mobile app.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-integration-steps.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/create-firestore-database.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Create Firestore Database\",\n            \"caption\": \"Start by creating a new Firestore database\",\n            \"description\": \"Set up your Firestore NoSQL database as the first step in cloud data storage.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/create-firestore-database.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firestore-security-rules.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Firestore Security Rules\",\n            \"caption\": \"Define rules for safe read\/write access\",\n            \"description\": \"Protect your database using Firebase Firestore secure access and permission rules.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firestore-security-rules.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/what-is-cloud-firestore.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \" What Is Cloud Firestore?\",\n            \"caption\": \"Google\u2019s flexible, scalable NoSQL cloud database\",\n            \"description\": \" Understand the benefits of using Cloud Firestore for real-time and scalable mobile apps.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/what-is-cloud-firestore.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/fetch-firestore-data.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Fetch Data from Firestore\",\n            \"caption\": \"Query Firestore to retrieve saved documents\",\n            \"description\": \"Learn how to fetch and display data from Firebase Firestore using efficient query models.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/fetch-firestore-data.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/chetan-patil-author.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Chetan Patil \u2013 Author of Step-by-Step Guide to Integrating Firebase Cloud Firestore into Your Mobile App\",\n            \"caption\": \"Meet Chetan Patil, a seasoned mobile app development expert and blog author.\",\n            \"description\": \"Chetan Patil is the author of this blog on Firebase Firestore integration. With deep industry knowledge, he shares practical mobile development insights.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/chetan-patil-author.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-competitor-apps.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \" Stay Ahead \u2013 Build Better Apps Than Your Competitors\",\n            \"caption\": \"Your competitors are leveraging better app experiences. What\u2019s your next move?\",\n            \"description\": \"A compelling CTA encouraging businesses to act fast and enhance their mobile app strategy using Firebase Firestore integration.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-competitor-apps.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-dream-app.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Build Your Dream App with Expert Firebase Integration\",\n            \"caption\": \"From concept to launch \u2014 let\u2019s bring your app vision to life.\",\n            \"description\": \" A strong call-to-action aimed at companies looking to turn their mobile app ideas into powerful, scalable solutions using Firebase Cloud Firestore.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-firestore-dream-app.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Step-by-Step Guide to Integrating Firebase Cloud Firestore into Your Mobile App\",\n            \"caption\": \"Explore the full guide on integrating Firebase Cloud Firestore into your mobile app.\",\n            \"description\": \"Hero banner image for the blog post targeting mobile developers, CTOs, and CROs with a guide to Firebase Cloud Firestore integration.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/steps-to-add-firebase-firestore-rules.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Steps to Add Firebase Firestore Security Rules for Mobile App Integration\",\n            \"caption\": \"Follow these steps to configure Firebase Firestore security rules, ensuring secure access and data protection in your mobile app.\",\n            \"description\": \"Learn how to configure Firebase Firestore security rules to secure your database and ensure safe access in your mobile app. This step is critical for controlling read and write permissions, essential for any mobile app using Firebase Firestore.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/steps-to-add-firebase-firestore-rules.png\"\n        },\n        {\n            \"@context\": \"https:\/\/schema.org\",\n            \"@type\": \"ImageObject\",\n            \"contentUrl\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/login-user-details.png\",\n            \"url\": \"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\n            \"name\": \"Fetch Authenticated User Data\",\n            \"caption\": \"Log in and retrieve user credentials\",\n            \"description\": \"Use Firebase Auth SDK to log in and fetch user profile details securely.\",\n            \"license\": \"https:\/\/mobisoftinfotech.com\/terms\",\n            \"acquireLicensePage\": \"https:\/\/mobisoftinfotech.com\/acquire-license\",\n            \"creditText\": \"Mobisoft Infotech\",\n            \"copyrightNotice\": \"Mobisoft Infotech\",\n            \"creator\": {\n                \"@type\": \"Organization\",\n                \"name\": \"Mobisoft Infotech\"\n            },\n            \"thumbnail\": \"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/login-user-details.png\"\n        }\n        ]\n    <\/script>\n","protected":false},"excerpt":{"rendered":"<p>Firebase, developed by Google, is a very powerful platform that provides many essential backend services, such as Firebase Authentication, Firestore, Realtime Database, Messaging System, Crash Reporting, Machine Learning, Analytics, File Storage, and many more. In this blog, I will guide you through the step-by-step integration of Firebase Cloud Firestore and Firebase Authentication into your mobile [&hellip;]<\/p>\n","protected":false},"author":112,"featured_media":38566,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[5028],"tags":[5641,5645,5640,5636,5647,5652,5639,5638,5634,5642,5643,5649,5656,5637,5635,5648,5653,5655,5650,5654,5659,5662,5658,5651,5646,5644,5660,5657,5663,5661,5664,5665],"class_list":["post-38558","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-app-development","tag-firebase-auth","tag-firebase-auth-flutter","tag-firebase-authentication","tag-firebase-firestore-flutter","tag-firebase-firestore-integration","tag-firebase-firestore-jetpack-compose","tag-firebase-firestore-kotlin","tag-firebase-firestore-react-native","tag-firebase-firestore-swift","tag-firebase-login","tag-firebase-sdk","tag-firestore-analytics-and-performance-monitoring","tag-firestore-authentication-integration","tag-firestore-crud-operations","tag-firestore-data-modeling-best-practices","tag-firestore-data-validation-and-error-handling","tag-firestore-full-text-search-with-algolia","tag-firestore-mobile-app-tutorial","tag-firestore-offline-data-persistence","tag-firestore-pagination-and-query-optimization","tag-firestore-real-time-updates","tag-firestore-security-rules-for-mobile-apps","tag-firestore-subcollections-and-data-structuring","tag-fix-firestore-connection-issues-in-android","tag-flutter-firebase-auth","tag-google-firebase-authentication","tag-handle-firestore-offline-data-synchronization","tag-integrate-firestore-into-android-app","tag-integrate-firestore-into-ios-app","tag-optimize-firestore-data-retrieval-times","tag-resolve-firestore-read-write-errors","tag-troubleshoot-firestore-authentication-failures"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Firebase Cloud Firestore: Step-by-Step Mobile App Integration<\/title>\n<meta name=\"description\" content=\"Learn to integrate Firebase Cloud Firestore into your mobile app with real-time sync, offline access, and secure data handling in this easy step-by-step guide.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Firebase Cloud Firestore: Step-by-Step Mobile App Integration\" \/>\n<meta property=\"og:description\" content=\"Learn to integrate Firebase Cloud Firestore into your mobile app with real-time sync, offline access, and secure data handling in this easy step-by-step guide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\" \/>\n<meta property=\"og:site_name\" content=\"Mobisoft Infotech\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-14T15:10:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-11T12:47:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/og-Integrating-Firebase-Cloud-Firestore.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"525\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Chetan Patil\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chetan Patil\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#article\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\"},\"author\":{\"name\":\"Chetan Patil\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c4a0d61b1fe2de2892e8b632f6f091ed\"},\"headline\":\"Step-by-Step Guide to Integrating Firebase Cloud Firestore into Your Mobile App\",\"datePublished\":\"2025-05-14T15:10:05+00:00\",\"dateModified\":\"2026-03-11T12:47:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\"},\"wordCount\":2902,\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png\",\"keywords\":[\"firebase auth\",\"firebase auth flutter\",\"firebase authentication\",\"firebase firestore flutter\",\"firebase firestore integration\",\"firebase firestore jetpack compose\",\"firebase firestore kotlin\",\"firebase firestore react native\",\"firebase firestore swift\",\"firebase login\",\"firebase sdk\",\"firestore analytics and performance monitoring\",\"firestore authentication integration\",\"firestore crud operations\",\"firestore data modeling best practices\",\"firestore data validation and error handling\",\"firestore full-text search with algolia\",\"firestore mobile app tutorial\",\"firestore offline data persistence\",\"firestore pagination and query optimization\",\"firestore real-time updates\",\"firestore security rules for mobile apps\",\"firestore subcollections and data structuring\",\"fix firestore connection issues in android\",\"flutter firebase auth\",\"google firebase authentication\",\"handle firestore offline data synchronization\",\"integrate firestore into android app\",\"integrate firestore into ios app\",\"optimize firestore data retrieval times\",\"resolve firestore read\/write errors\",\"troubleshoot firestore authentication failures\"],\"articleSection\":[\"App Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\",\"name\":\"Firebase Cloud Firestore: Step-by-Step Mobile App Integration\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png\",\"datePublished\":\"2025-05-14T15:10:05+00:00\",\"dateModified\":\"2026-03-11T12:47:41+00:00\",\"author\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c4a0d61b1fe2de2892e8b632f6f091ed\"},\"description\":\"Learn to integrate Firebase Cloud Firestore into your mobile app with real-time sync, offline access, and secure data handling in this easy step-by-step guide.\",\"breadcrumb\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#primaryimage\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png\",\"contentUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png\",\"width\":855,\"height\":392,\"caption\":\"Firebase Cloud Firestore integration blog banner\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mobisoftinfotech.com\/resources\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Step-by-Step Guide to Integrating Firebase Cloud Firestore into Your Mobile App\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/\",\"name\":\"Mobisoft Infotech\",\"description\":\"Discover Mobility\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c4a0d61b1fe2de2892e8b632f6f091ed\",\"name\":\"Chetan Patil\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/5f1143547765a9c05897312c84f4a0e864c193bf1e666d239553b3b1fe56d7da?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5f1143547765a9c05897312c84f4a0e864c193bf1e666d239553b3b1fe56d7da?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5f1143547765a9c05897312c84f4a0e864c193bf1e666d239553b3b1fe56d7da?s=96&r=g\",\"caption\":\"Chetan Patil\"},\"sameAs\":[\"https:\/\/mobisoftinfotech.com\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Firebase Cloud Firestore: Step-by-Step Mobile App Integration","description":"Learn to integrate Firebase Cloud Firestore into your mobile app with real-time sync, offline access, and secure data handling in this easy step-by-step guide.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration","og_locale":"en_US","og_type":"article","og_title":"Firebase Cloud Firestore: Step-by-Step Mobile App Integration","og_description":"Learn to integrate Firebase Cloud Firestore into your mobile app with real-time sync, offline access, and secure data handling in this easy step-by-step guide.","og_url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration","og_site_name":"Mobisoft Infotech","article_published_time":"2025-05-14T15:10:05+00:00","article_modified_time":"2026-03-11T12:47:41+00:00","og_image":[{"width":1000,"height":525,"url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/og-Integrating-Firebase-Cloud-Firestore.png","type":"image\/png"}],"author":"Chetan Patil","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Chetan Patil","Est. reading time":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#article","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration"},"author":{"name":"Chetan Patil","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c4a0d61b1fe2de2892e8b632f6f091ed"},"headline":"Step-by-Step Guide to Integrating Firebase Cloud Firestore into Your Mobile App","datePublished":"2025-05-14T15:10:05+00:00","dateModified":"2026-03-11T12:47:41+00:00","mainEntityOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration"},"wordCount":2902,"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png","keywords":["firebase auth","firebase auth flutter","firebase authentication","firebase firestore flutter","firebase firestore integration","firebase firestore jetpack compose","firebase firestore kotlin","firebase firestore react native","firebase firestore swift","firebase login","firebase sdk","firestore analytics and performance monitoring","firestore authentication integration","firestore crud operations","firestore data modeling best practices","firestore data validation and error handling","firestore full-text search with algolia","firestore mobile app tutorial","firestore offline data persistence","firestore pagination and query optimization","firestore real-time updates","firestore security rules for mobile apps","firestore subcollections and data structuring","fix firestore connection issues in android","flutter firebase auth","google firebase authentication","handle firestore offline data synchronization","integrate firestore into android app","integrate firestore into ios app","optimize firestore data retrieval times","resolve firestore read\/write errors","troubleshoot firestore authentication failures"],"articleSection":["App Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration","url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration","name":"Firebase Cloud Firestore: Step-by-Step Mobile App Integration","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#primaryimage"},"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png","datePublished":"2025-05-14T15:10:05+00:00","dateModified":"2026-03-11T12:47:41+00:00","author":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c4a0d61b1fe2de2892e8b632f6f091ed"},"description":"Learn to integrate Firebase Cloud Firestore into your mobile app with real-time sync, offline access, and secure data handling in this easy step-by-step guide.","breadcrumb":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#primaryimage","url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png","contentUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/05\/firebase-cloud-firestore-mobile-app-integration.png","width":855,"height":392,"caption":"Firebase Cloud Firestore integration blog banner"},{"@type":"BreadcrumbList","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/app-development\/firebase-cloud-firestore-mobile-app-integration#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mobisoftinfotech.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Step-by-Step Guide to Integrating Firebase Cloud Firestore into Your Mobile App"}]},{"@type":"WebSite","@id":"https:\/\/mobisoftinfotech.com\/resources\/#website","url":"https:\/\/mobisoftinfotech.com\/resources\/","name":"Mobisoft Infotech","description":"Discover Mobility","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/c4a0d61b1fe2de2892e8b632f6f091ed","name":"Chetan Patil","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5f1143547765a9c05897312c84f4a0e864c193bf1e666d239553b3b1fe56d7da?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5f1143547765a9c05897312c84f4a0e864c193bf1e666d239553b3b1fe56d7da?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5f1143547765a9c05897312c84f4a0e864c193bf1e666d239553b3b1fe56d7da?s=96&r=g","caption":"Chetan Patil"},"sameAs":["https:\/\/mobisoftinfotech.com\/"]}]}},"_links":{"self":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/38558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/users\/112"}],"replies":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/comments?post=38558"}],"version-history":[{"count":38,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/38558\/revisions"}],"predecessor-version":[{"id":47525,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/38558\/revisions\/47525"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media\/38566"}],"wp:attachment":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media?parent=38558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/categories?post=38558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/tags?post=38558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}