Docly Child

Firebase Configuration

Estimated reading: 2 minutes

Create a new firebase project

  • We are creating the “Example” sample project.
  • After completing the project, you will be presented with this type of dashboard.
  • Go to the Project Settings and configure the Support Email

Add app with the package name in firebase console

  • On the Firebase console, click the Android icon.
  • Enter Package Name(e.g com.iqonic.example) and click on register app
  • After registering the app, you will receive the google-services.json file; download it and save it to the android/app/ folder

Add IOS app with the package name in firebase console

  • On the Firebase console, click the IOS icon.
  • Enter Package Name(e.g com.iqonic.example) and click on register app
  • After registering the app, you will receive the GoogleService-Info.plist file; download it and drag and drop to xcode as location shown in image

    Here is the steps how to open ios in xcode
  • Open Xcode.
  • Select Open another Project.
  • Open the iOS directory within your app.
  • Now, click on Done button.

Enable Firebase Notification in Mobile for both Android and IOS

  • Firstly, go to the Admin Dashboard, Click on  the Settings –> App Configuration in the left sidebar
  • Add your Firebase Web API Key ( Server Key ) and click on Save.

For Server Key

  • Click on  Project Overview  –> Settings – Cloud Messaging 
  • In Cloud Messaging API (Legacy), click the three dots and select “Manage in Google Cloud Console.” After the page is successfully redirected, open the Firebase Console again and Refresh the Cloud Messaging tab to find the Server Key, copy that key and set it in Admin Panel.
  • After enable it, Firebase Notification is working!
 For IOS :
  • Login into Firebase and select the your project
  • Go to the Project Settings and select the Cloud Messaging section
  • Scroll down and you can show Apple app configuration section and select your iOS build identifiers which you have used for the Specific App
  • You can get Upload APNs Certificates popup and drag or select your support.p12 certificate

 

  • After that add the below code in AppDelegate.swift file under ios folder in your project
if #available(iOS 10.0, *) {
  UNUserNotificationCenter.current().delegate
  = self as? UNUserNotificationCenterDelegate
}
 
Share this Doc
CONTENTS