Docly Child

Firebase Configuration

Estimated reading: 2 minutes 0 views

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

For Firebase Details

  • Obtain Firebase Service Account json file
    1. Click on Service accounts in the project Settings.
    2. Click on Generate new Private key Button and download the service json file.
  • Copy “project_id” , “private_key” and “client_email” from the generated json file
  • Go to the Admin Panel, select the App option in the left sidebar
  • Select Setting
  • Paste the values into respective fields.
  • Save the changes 
 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