Reputation: 2326
There's a codemagic guide that shows how to use google-services.json
and GoogleService-Info.plist
without committing them to the main repo:
https://docs.codemagic.io/custom-scripts/load-firebase-configuration/
I've renamed the variables used, but otherwise followed the steps exactly for my project. The pre-build script shows this error:
/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/build_script_3_0_ef_shxdc: line 5: /Users/builder/clone/android/app/google-services.json: No such file or directory
The "No such file or directory" makes me wonder if the $FCI_BUILD_DIR
variable isn't right?
Any help would be appreciated
Upvotes: 0
Views: 787
Reputation: 216
The error shows that your $FCI_BUILD_DIR
is expanded correctly.
First thing you can do is make sure the parent directory exists.
if not you can just add this:
mkdir -p $FCI_BUILD_DIR/android/app
before the echo..
part. and if needed the same with /ios/Runner
or if your project exists within a subdirectory then you will need to reflect the directory structure in your pre-build script.
Upvotes: 2