# Integrate firebase in ionic/native

**URL:** <https://forum.ionicframework.com/t/integrate-firebase-in-ionic-native/185013>\
**Category:** Ionic Framework\
**Created:** [March 12, 2020, 2:05pm UTC](https://forum.ionicframework.com/t/integrate-firebase-in-ionic-native/185013 "2020-03-12T14:05:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ginilf](https://avatars.discourse-cdn.com/v4/letter/g/46a35a/32.png) [@ginilf](https://forum.ionicframework.com/u/ginilf)\
**Post date:** [March 12, 2020, 2:05pm UTC](https://forum.ionicframework.com/t/integrate-firebase-in-ionic-native/185013/1 "2020-03-12T14:05:01Z")

</div>

I am trying to build by native app using ionic appFlow in the cloud… howerver i get the following error.

FAILURE: Build failed with an exception.

- What went wrong:  
Execution failed for task ‘:app:processDebugGoogleServices’.

> File google-services.json is missing. The Google Services Plugin cannot function without it.  
> Searched Location:  
> /builds/Henryisthebest/giving/android/app/src/nullnull/debug/google-services.json  
> /builds/Henryisthebest/giving/android/app/src/debug/nullnull/google-services.json  
> /builds/Henryisthebest/giving/android/app/src/nullnull/google-services.json  
> /builds/Henryisthebest/giving/android/app/src/debug/google-services.json  
> /builds/Henryisthebest/giving/android/app/src/nullnullDebug/google-services.json  
> /builds/Henryisthebest/giving/android/app/google-services.jso

How do i make by google-services.json file copy into the android/app folder?

---

<div class="post-metadata">

**Author:** ![ginilf](https://avatars.discourse-cdn.com/v4/letter/g/46a35a/32.png) [@ginilf](https://forum.ionicframework.com/u/ginilf)\
**Post date:** [March 12, 2020, 2:06pm UTC](https://forum.ionicframework.com/t/integrate-firebase-in-ionic-native/185013/2 "2020-03-12T14:06:23Z")

</div>

Ionic:

Ionic CLI : 5.4.16 (/usr/local/lib/node\_modules/ionic)  
Ionic Framework : @ionic/angular 5.0.4  
@angular-devkit/build-angular : 0.803.24  
@angular-devkit/schematics : 8.3.20  
@angular/cli : 8.3.20  
@ionic/angular-toolkit : 2.2.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)  
Cordova Platforms : ios 5.1.1  
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 11 other plugins)

Utility:

cordova-res : not installed  
native-run (update available: 0.3.0) : 0.2.8

System:

NodeJS : v10.16.0 (/usr/local/bin/node)  
npm : 6.9.0  
OS : macOS Mojave

---

<div class="post-metadata">

**Author:** ![EinfachHans](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/einfachhans/32/130917_2.png) [@EinfachHans](https://forum.ionicframework.com/u/EinfachHans)\
**Post date:** [March 12, 2020, 2:08pm UTC](https://forum.ionicframework.com/t/integrate-firebase-in-ionic-native/185013/3 "2020-03-12T14:08:24Z")

</div>

Add this to under the `android` Section in the `config.xml`:

```auto
<resource-file src="google-services.json" target="app/google-services.json"></resource-file>

```

---

<div class="post-metadata">

**Author:** ![ab-iym](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@ab-iym](https://forum.ionicframework.com/u/ab-iym)\
**Post date:** [May 11, 2020, 4:42pm UTC](https://forum.ionicframework.com/t/integrate-firebase-in-ionic-native/185013/4 "2020-05-11T16:42:54Z")

</div>

@EinfachHans i have the same issue with ionic appflow. Do you have any idea(s) on how i can fix this issue without having to upload the google-services.json file (for security purposes) to my online git repository.

Thanks

---

<div class="post-metadata">

**Author:** ![EinfachHans](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/einfachhans/32/130917_2.png) [@EinfachHans](https://forum.ionicframework.com/u/EinfachHans)\
**Post date:** [May 11, 2020, 4:56pm UTC](https://forum.ionicframework.com/t/integrate-firebase-in-ionic-native/185013/5 "2020-05-11T16:56:25Z")

</div>

I think the Project Files are the correct location for these files. Your Git Repository should be private.

---

<div class="post-metadata">

**Author:** ![ab-iym](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@ab-iym](https://forum.ionicframework.com/u/ab-iym)\
**Post date:** [May 11, 2020, 5:15pm UTC](https://forum.ionicframework.com/t/integrate-firebase-in-ionic-native/185013/6 "2020-05-11T17:15:55Z")

</div>

@EinfachHans Thanks for the reply.  
So what you are saying is, the only way i can fix the issue is by including the google-services.json when uploading the project files to the repository? Because what i did is, i uploaded all the ionic project files excluding the platforms folder to my online repository. The platforms folder contains the google-services.json file in “android/app” dir. Then in connected the repository to Ionic Appflow.  
I thought appflow had a provision to add this file separately.

---

<div class="post-metadata">

**Author:** ![EinfachHans](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/einfachhans/32/130917_2.png) [@EinfachHans](https://forum.ionicframework.com/u/EinfachHans)\
**Post date:** [May 11, 2020, 5:26pm UTC](https://forum.ionicframework.com/t/integrate-firebase-in-ionic-native/185013/7 "2020-05-11T17:26:18Z")

</div>

The `platforms` Folder is the Place where the File should be after build. As it is 100% generated, it is the wrong Place to place additional Files before. In my project i included it in the root folder and added it to the android platform via config.xml.

---

<div class="post-metadata">

**Author:** ![ab-iym](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@ab-iym](https://forum.ionicframework.com/u/ab-iym)\
**Post date:** [May 11, 2020, 5:36pm UTC](https://forum.ionicframework.com/t/integrate-firebase-in-ionic-native/185013/8 "2020-05-11T17:36:57Z")

</div>

Oh Alright. Makes sense. Thanks
