Search code examples
iosreact-nativevisual-studio-app-center

AppCenter react native ios build fails:"The following build commands failed: CopyPlistFile"


My app is built with react native.
I use Xcode 11 for development, and App Center for build.
I manage to build+archive the app (and run it on my device) when I build it locally on my mac.
However, when I build the app on App Center I get the following error:

The following build commands failed: CopyPlistFile /Users/runner/Library/Developer/Xcode/DerivedData/MyApp-glnwmpshuhlwezeyiaupgnbnizsy/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app/GoogleService-Info.plist /Users/runner/runners/2.160.1/work/1/GoogleService-Info.plist (1 failure) [error]Error: /usr/bin/xcodebuild failed with return code: 65

I made sure that I am using legacy build system on App Center (just like on the local).


Solution

  • it's not enough to add a reference to "GoogleService-Info.plist" file. You also have to make sure that it's physically located in the folder.

    You should copy the file to the root of the project (so you can see it in finder in the root), and then delete the previous reference to the file, and the add file again (right click + add file from xcode).