Search code examples
iosfirebasefluttercodemagic

Codemagic iOS build fails due to firebase GoogleService-Info.plist


I am building my flutter project with codemagic for iOS. The android build works as expexted. The iOS build error:

    Xcode build done.                                           1520.2s
    
    Failed to build iOS app
    Error output from Xcode build:
    ↳
        ** BUILD FAILED **
    
    
    Xcode's output:
    
    [...]

    error: Build input file cannot be found: '/Users/Downloads/GoogleService-Info.plist' (in target 'Runner' from project 'Runner')
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description

Encountered error while building for device.



Build failed :|
Failed to build for iOS

However my ios/Runner contains the GoogleService-Info.plist file.

I have also tried to create environment variables to store this file without success.

I am stuck at this point, so any help is greatly appreciated!


Solution

  • Solved the problem! As @Paul Beusterien mentioned, the build system expects the file to be located at /Users/Downloads/GoogleServices-Info.plist.

    How to change that?

    Two possible solutions:

    1. If you have Xcode: Simply click on the file and use the file inspector to change the location of the path to "Relative to project".

    2.Without using Xcode: Go into your project.pbxproj file and look for name="GoogleServices-Info.plist" path="..." and change that path to just "GoogleServices-Info.plist", if the file is in your ios/Runner/ folder.