Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Reference Links

Firebase Analytics

Firebase Integration in different Adding Members to the Firebase Console

  • Select the respective Project from the Firebase Console.

  • Beside the project overview option one gear option(settings) will be there tap on that, three option will come, from that select Users and Permissions option as show in below image

    Image Added
  • In Users and Permissions tab select the button Add member it will open a mini dialog, there enter respective user mail ID and select role as Editor as shown in below image, tap on Add member option

    Image Added
  • After Tapping on Add member it will send an firebase invitation mail to respective person, once they accepted it, they can access the firebase project.


Firebase App Creation for Multi-Platforms

  • Select the project from Firebase Console.

  • Project view Overview console will open, here we need to create three apps
    for three platforms(IOS, Android and Web), below are the respective steps to create apps app for three different platforms

    Android
    Tap on Add app plus icon and select android Android Icon, it will navigate to register android app page, copy paste this package name -> com.dwss.mgramseva package name in first field as shown in below image, after that tap on register app button, it will generate a google-services.json, successfully app was created, now close this window.

    Image RemovedImage Added


    IOS
    Tap on Add app and select IOS Icon, it will navigate to register IOS app page, copy paste this Apple bundle ID name -> com.dwss.mgramseva Apple bundle ID name in first field as shown in below image, after that tap on register app button, it will generate a googlegoogleService-services.jsonInfo.plist,successfully app was created, now close this window.

    Image RemovedImage Added



    Web
    Tap on Add app and select script tag Icon, it will navigate to register Web app page, copy paste this mgramseva name in first field as shown in below image, after that tap on register app button, it will generate html code which consists of firebase keys, successfully app was created, now close this window.

    Image RemovedImage Added

Firebase Integration in different Platforms

...

  • User need to have access to this dwss respective firebase analytics account.

  • Once you have access, navigate to the Firebase console.

  • Select mGramseva application respective project from list of projects.

  • Tap on Project over view option, there you can see all the created Apps as shown in image.

  • Beside the project overview option one gear option(settings) will be there tap on that, three option will come, from that select Project settings,

  • select general tab(by default it is selected only) their we can see all the created applications will be listed out there.as apps shown in below image.

    Image Added
  • Below are the steps for integrating the Firebase for all three platforms(IOS, Android, Web).

Integration With Android

  • In general tab select the Android App

...

  • , download on the

...

  • google-services.json as shown in below image.

    Image Added
  • Add this Json file to the android app folder as shown in below image.

    Image Added

Integration With IOS

  • In general tab select the IOS App and

...

  • download on the GoogleService-Info.plist as shown in below image.

    Image Added
  • Add this plist file to the ios app folder as shown in below image.

    Image Added


Integration With Web

In general tab select the Web App and follow the steps under scroll to the SDK setup and configuration.

...

, In that we can find the firebaseConfig object as shown in below, upload that object to S3 bucket using below aws command.

const firebaseConfig = {
  apiKey: "AIzaSyCNeX_MlTZXOVl_7pf5S0hVnd4a******",
  authDomain: "mgramseva-qa-****.firebaseapp.com",

...


  projectId:

...

"mgramseva-

...

qa-*****",

...


  storageBucket:

...

"mgramseva

...

-qa-*****.appspot.com",

...


  messagingSenderId:

...

"1274078******",
  appId: "1:

...

127407896491:web:

...

a3508fdb2a0f045******",

...


  measurementId:

...

"G-

...

8H6W5D****"

...

};

Command → aws s3 cp path s3://bucket_name/firebaseConfigs.js --acl public-read

Place the below code in respective environment yaml file and replace the src attribute with valid url.

Code Block
frontend-mgramseva:
  custom-js-injection: |
    sub_filter.conf: "
      sub_filter  '<head>' '<head>
      <script src=https://s3_bucket_path/firebaseConfigs.js type=text/javascript></script>
      ';"

Below was the reference PR which is used to made dev and QA changes
https://github.com/misdwss/iFix-DevOps/pull/286/files

Methods Utilized to log the Data in Firebase

...