{"id":136,"date":"2025-03-20T07:13:38","date_gmt":"2025-03-20T07:13:38","guid":{"rendered":"https:\/\/documentation.iqonic.design\/handyman\/?p=136"},"modified":"2025-08-19T03:55:36","modified_gmt":"2025-08-19T03:55:36","slug":"firebase-configuration","status":"publish","type":"post","link":"https:\/\/documentation.iqonic.design\/handyman\/firebase-configuration\/","title":{"rendered":"Firebase Configuration"},"content":{"rendered":"<div class=\"nolwrap\">\n<p>Setting up Firebase for your Handyman Service Project<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Create A New Firebase Project<\/strong><\/h2>\n\n\n\n<p>1. We are creating the &#8220;Example&#8221; sample project.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"466\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration1.png\" alt=\"\" class=\"wp-image-686\" \/><\/figure>\n\n\n\n<p>2. After completing the project, you will be presented with this type of dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"474\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration2.png\" alt=\"\" class=\"wp-image-687\" \/><\/figure>\n\n\n\n<p>3. Go to the Project Settings and configure the Support Email.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"470\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration3.png\" alt=\"\" class=\"wp-image-688\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Add App With The Package Name In Firebase Console<\/strong><\/h2>\n\n\n\n<p>1.On the Firebase console, click the Android icon.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"479\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration4.png\" alt=\"\" class=\"wp-image-689\" \/><\/figure>\n\n\n\n<p>2.Enter Package Name (e.g., com.example.userApp) and click on register app.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"478\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration5.png\" alt=\"\" class=\"wp-image-690\" \/><\/figure>\n\n\n\n<p>3. After registering the app, you will receive the Google JSON file, download it and save it to the&nbsp;<strong>android\/app\/<\/strong>&nbsp;folder.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"477\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration6.png\" alt=\"\" class=\"wp-image-691\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Set Up Firebase Authentication<\/strong><\/h2>\n\n\n\n<p>1.Go to Build -&gt; Authentication tab and click on Get started.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"471\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration7.png\" alt=\"\" class=\"wp-image-692\" \/><\/figure>\n\n\n\n<p>2.Then select the Email\/Password, Google, Apple, and Phone Number one by one and enable them.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"531\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration8.png\" alt=\"\" class=\"wp-image-693\" \/><\/figure>\n\n\n\n<p>3.Re-check if all these 3 modes of authentication are enabled or not.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"950\" height=\"328\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration9.png\" alt=\"\" class=\"wp-image-694\" \/><\/figure>\n\n\n\n<p>4. For Connecting Chat server<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click on&nbsp;<strong>Setting<\/strong>&nbsp;tab<\/li>\n\n\n\n<li>Select&nbsp;<strong>Users Action<\/strong><\/li>\n\n\n\n<li>Disable&nbsp;<strong>&#8220;Email Enumeration Protection&#8221;<\/strong>&nbsp;option<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1308\" height=\"670\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration10.png\" alt=\"\" class=\"wp-image-695\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Activating The Firestore Database<\/strong><\/h2>\n\n\n\n<p>1.Go to&nbsp;<strong>Build \u2192 Firestore Database<\/strong>&nbsp;tab and click on Get Started.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"472\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration11.png\" alt=\"\" class=\"wp-image-696\" \/><\/figure>\n\n\n\n<p>2. When you click the Get Started button, a dialogue will appear asking you to choose a mode. Because we are testing, we will select the Start in Test Mode option and then click Next and then enable it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"469\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration12.png\" alt=\"\" class=\"wp-image-697\" \/><\/figure>\n\n\n\n<p>3. Change the Firestore&#8217;s rules to save the data in a database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"475\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration13.png\" alt=\"\" class=\"wp-image-698\" \/><\/figure>\n\n\n\n<p>Before Changing Rules:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">rules_version = '2';<br>service cloud.firestore {<br>  match \/databases\/{database}\/documents {<br>    match \/{document=**} {<br>      allow read, write: if request.time &lt; timestamp.date(2022, 8, 26);<br>    }<br>  }<br>}<\/pre>\n\n\n\n<p>After Changing Rules:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">rules_version = '2';<br>service cloud.firestore {<br>  match \/databases\/{database}\/documents {<br>    match \/{document=**} {<br>      allow read, write: if request.auth != null;<br>    }<br>  }<br>}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>SHA Fingerprint<\/strong><\/h3>\n\n\n\n<p><strong>INFO<\/strong><\/p>\n\n\n\n<p>SHA-1 fingerprint is a unique key generated for your PC that can be used for signing. It is important to have in the add Firebase as we are using Google Login and OTP Login, and to authorize these logins, we need a SHA Fingerprint certificate<\/p>\n\n\n\n<p>Add a SHA fingerprint to Firebase:<\/p>\n\n\n\n<p>1.Follow these steps if you didn&#8217;t initially provide a SHA certificate fingerprint for your Firebase Android app or if you need to add an additional one:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In your Project settings, go to the Your apps card.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"471\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration14.png\" alt=\"\" class=\"wp-image-699\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select the Firebase Android app to which you want to add a SHA fingerprint.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"469\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration15.png\" alt=\"\" class=\"wp-image-700\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click Add fingerprint.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"466\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration16.png\" alt=\"\" class=\"wp-image-701\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enter or paste the SHA fingerprint, then click Save.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to generate the SHA from Android Studio<\/strong><\/h2>\n\n\n\n<p><strong>THERE ARE TWO TYPES OF SHA FINGERPRINT, RELEASE SHA FINGERPRINT, AND DEBUG SHA<\/strong><\/p>\n\n\n\n<p>Fingerprint. Here we will see how to generate both types of SHA Fingerprint.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/documentation.iqonic.design\/handyman\/app-faqs\/how-to-generate-the-sha-in-android-studio\">How to generate SHA in Android studio<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Add .p8 Certificate to enable OTP Login in iOS<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Login into Firebase and select your project.<\/li>\n\n\n\n<li>Go to the&nbsp;<strong>Project Settings<\/strong>&nbsp;and select the&nbsp;<strong>Cloud Messaging<\/strong>&nbsp;section.<\/li>\n\n\n\n<li>Scroll down to find the&nbsp;<strong>Apple app configuration<\/strong>&nbsp;section and select your iOS build identifiers that you have used for the Customer App.<\/li>\n\n\n\n<li>You will see an&nbsp;<strong>Upload APNs auth key<\/strong>&nbsp;popup. Drag or select your support.p8 certificate you&#8217;ve generated for the Customer App.<\/li>\n\n\n\n<li>Add your&nbsp;<strong>Key ID<\/strong>&nbsp;and&nbsp;<strong>Team ID<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Enable Firebase Notification in Mobile for Both Android and iOS<\/strong><\/h2>\n\n\n\n<p><strong>Obtain Project ID From Firebase<\/strong><\/p>\n\n\n\n<p>1.Click on&nbsp;<strong>Project Overview<\/strong>&nbsp;\u2192&nbsp;<strong>Project Settings<\/strong>&nbsp;\u2192&nbsp;<strong>General<\/strong><\/p>\n\n\n\n<p>2. In General Settings Copy the&nbsp;<strong>\u201cProject ID from Firebase\u201d<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1882\" height=\"808\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration17.png\" alt=\"\" class=\"wp-image-702\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Obtain Firebase Service Account Json file<\/strong><\/h2>\n\n\n\n<p><strong>INFO<\/strong><\/p>\n\n\n\n<p>The Firebase Service Account JSON file is not specific to any one app. It\u2019s a secure file used to authenticate and authorize backend services and manage server-to-server interactions with Firebase. In this setup, we\u2019re using it specifically for handling notifications, ensuring secure and reliable delivery through Firebase.<\/p>\n\n\n\n<p>1.Click on Service accounts in the project Settings.<\/p>\n\n\n\n<p>2.Click on&nbsp;<strong>Generate new Private key<\/strong>&nbsp;Button and Download the service Json file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1854\" height=\"877\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration18.png\" alt=\"\" class=\"wp-image-703\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Add Firebase Project Id and Service Account Json file to Admin Panel<\/strong><\/h2>\n\n\n\n<p>1.Go to the Admin Panel, select the&nbsp;<strong>&#8220;Setting&#8221;<\/strong>&nbsp;option in the left sidebar under the System section.<\/p>\n\n\n\n<p>2. Select&nbsp;<strong>&#8220;App Configuration Setting&#8221;<\/strong>&nbsp;and enable Firebase Notification.<\/p>\n\n\n\n<p>3. Add your<strong> Firebase Project ID<\/strong> and<strong> <\/strong>Upload your Firebase Service Account <strong>Json file<\/strong> and click on &#8220;<strong>Save<\/strong>&#8221; Button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1905\" height=\"829\" src=\"https:\/\/documentation.iqonic.design\/handyman\/wp-content\/uploads\/sites\/9\/2025\/03\/Firebase_Configuration19.png\" alt=\"\" class=\"wp-image-704\" \/><\/figure>\n\n\n\n<p><strong>INFO<\/strong><\/p>\n\n\n\n<p>If Service Account Json file upload fails due to permission issue or any other reason then,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open your backend code.<\/li>\n\n\n\n<li>Create folder with name&nbsp;<strong>&#8220;data&#8221;<\/strong>&nbsp;inside&nbsp;<strong>storage<\/strong>&nbsp;\u2192&nbsp;<strong>app<\/strong><\/li>\n\n\n\n<li>Place the Service Account JSON file inside the&nbsp;<strong>&#8220;data&#8221;<\/strong>&nbsp;folder.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>For iOS:<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create APNs Certificate, please visit the&nbsp;<a href=\"https:\/\/documentation.onesignal.com\/docs\/generate-an-ios-push-certificate#step-3-generate-push-certificate\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a>&nbsp;and follow step 3.<\/li>\n\n\n\n<li>Log in to Firebase and select your project.<\/li>\n\n\n\n<li>Go to the Project Settings and select the &#8220;Cloud Messaging&#8221; section.<\/li>\n\n\n\n<li>Scroll down to the Apple app configuration section and select your iOS build identifiers used for the Specific App.<\/li>\n\n\n\n<li>You&#8217;ll get an&nbsp;<strong>&#8220;Upload APNs Certificates&#8221;<\/strong>&nbsp;popup, then drag or select your support.p12 certificate.<\/li>\n<\/ol>\n\n\n\n<p>After that, add the below code in AppDelegate.swift file under ios folder in your project:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">if #available(iOS 10.0, *) {<br>  UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate<br>}<\/pre>\n\n\n\n<p><strong>SUCCESSFULL !!<\/strong><\/p>\n\n\n\n<p><strong><em>Great! You Have Successfully Configured Firebase!<\/em><\/strong><\/p>\n\n\n\n<p><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Setting up Firebase for your Handyman Service Project Create A New Firebase Project 1. We are creating the &#8220;Example&#8221; sample project. 2. After completing the project, you will be presented with this type of dashboard. 3. Go to the Project Settings and configure the Support Email. Add App With The Package Name In Firebase Console [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"parent":132,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-136","post","type-post","status-publish","format-standard","hentry","category-handyman-services"],"featured_image_src":null,"author_info":{"display_name":"laraveladminiq","author_link":"https:\/\/documentation.iqonic.design\/handyman\/author\/laraveladminiq\/"},"children":[],"_links":{"self":[{"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":8,"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":1897,"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/posts\/136\/revisions\/1897"}],"up":[{"embeddable":true,"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/posts\/132"}],"wp:attachment":[{"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/documentation.iqonic.design\/handyman\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}