Could not find a valid GoogleService-Info.plist in your project


I am having trouble building my iOS app using Ionic Appflow. I am successfully able to build my Andorid app, but my iOS app keeps failing with the below error:

Terminating app due to uncaught exception 'com.firebase.core', reason: '`FirebaseApp.configure()` could not find a valid GoogleService-Info.plist in your project. Please download one from'

I have included this file in my app as directed by the Using Push Notifications with Firebase in an Ionic + Angular App tutorial.

Ionic support told me to try adding the below to my package.json, but that also did not make any difference.

 "capacitor:sync:after": "cp ./ios/app/app/GoogleService-Info.plist ../GoogleService-Info.plist && echo 'Moved GoogleService-Info.plist'"

The build is successful, but when I try to run it on an iOS simulator, the app crashes with the above error. Please note that our team does not have a mac and is solely relying on Appflow to build our iOS app.

Here are my build logs:

I would greatly appreciate any help. This is the last issue preventing us from deploying our app. Therefore, any help is greatly appreciated.

Thank You

On iOS copying files to the project folder doesn’t actually add those files to the project, you have to add them to the Xcode project.
I think you can use trapeze’s project API to add files with addFile method.
Or there are other npm libraries for editing Xcode project files too.

is this resolved issue ? @khalsaschoolbc

No, capacitor: sync did not work.

The issue is that the GoogleService-Info.plist file needs to be added in the project using XCode. It cannot be copied into the project through the standard file explorer.

ok , in my case using xcode its working when i drag file in app/app folder. but In Ionic appflow build is getting faild.

thanks @ khalsaschoolbc , for your quick response. its working in IONIC Appflow also without any capacitor:sync:after…

unfortunately manual Xcode/Android Studio use is the only official way due to limitations of automated/programatic editing of iOS/Android projects. The consequence is serious antipattern of committing full mobile apps to the repo.

Use of trapeze project-api seems the right way to proceed (currently I use node-xcode package in a similar way) to add/update the GoogleService-Info.plist