Unable to build iOS app with GoogleService-Info.plist as EAS secrets

Today, I have a project with a GoogleService-Info.plist, like the documentation I’ve create an EAS secret with my file encoded in base64.

Then inside the eas-build-pre-install I decode my file, but when the worker try to do the Prebuild step it throw an error like the file doesn’t exist…

[10:17:48] [ios.xcodeproj]: withIosXcodeprojBaseMod: ENOENT: no such file or directory, copyfile '/Users/expo/workingdir/build/ios/GoogleService-Info.plist' -> '/Users/expo/workingdir/build/ios/Ko/GoogleService-Info.plist'
[10:17:48] Error: [ios.xcodeproj]: withIosXcodeprojBaseMod: ENOENT: no such file or directory, copyfile '/Users/expo/workingdir/build/ios/GoogleService-Info.plist' -> '/Users/expo/workingdir/build/ios/Ko/GoogleService-Info.plist'

To decode EAS secret, I’ve try the .sh way and the nodejs way.


echo "$IOS_GOOGLE_SERVICES_BASE64" | base64 -d > ios/GoogleService-Info.plist
chmod 666 ios/GoogleService-Info.plist


const fs = require('fs')

const iosgoogleservicesbase64 = process.env.IOS_GOOGLE_SERVICES_BASE64
console.log('iosgoogleservicesbase64', iosgoogleservicesbase64)
const decoded = Buffer.from(iosgoogleservicesbase64, 'base64').toString()
console.log('decoded', decoded)

const koPath = './ios/GoogleService-Info.plist'

fs.writeFileSync(koPath, decoded)

const koFile = fs.readFileSync(koPath, { encoding: 'utf-8' })

console.log('koFile', koFile)

During my log, my file is present, so I don’t understand why the worker doesn’t work.

at the beging of prebuild you can see

- Clearing ios
✔ Cleared ios code

which deltes entire ios dir

normally you would be prompted with

The ios project is malformed, would you like to clear the project files and reinitialize them? … yes

but on eas builder prebuild command is run with --non-interactive option

just use a different directory than ios/android and it should work


Thanks I’ll try !

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.