Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Xcode 11 unable to CopyPlistFile plist file that was just copied using build phase

$
0
0

I'm trying to follow the instructions here (for iOS) for setting up multiple environments for my React Native project. The idea is that I can make use of Build Phases to copy any plist into GoogleService-Info.plist to enable the use of different Firebase environments for different Xcode schemes.

I've made a user-defined build setting for each of my 4 Xcode configurations called GOOGLE_SERVICE_PLIST_SUFFIX, and I have a build phase (it's the first one that's run before React native Copies and Bundles its required assets) with the following code:

cp -r "GoogleService-Info"$GOOGLE_SERVICE_PLIST_SUFFIX".plist""GoogleService-Info.plist"&wait $!echo "${GOOGLE_SERVICE_PLIST_SUFFIX} Firebase plist copied"

I can tell that the copying is indeed successful, but for some reason the build fails with this error:

The following build commands failed:    CopyPlistFile /Users/andersonaddo/myappname/ios/build/biteup/Build/Products/Prod.Debug-iphonesimulator/Myappname.app/GoogleService-Info.plist /Users/andersonaddo/myappname/ios/GoogleService-Info.plist(1 failure)

Looking at the error trace, this error is explained a bit further:

CopyPlistFile /Users/andersonaddo/myappname/ios/build/myappname/Build/Products/Prod.Debug-iphonesimulator/Myappname.app/GoogleService-Info.plist /Users/andersonaddo/myappname/ios/GoogleService-Info.plist (in target 'myappname' from project 'myappname')    cd /Users/andersonaddo/myappname/ios    builtin-copyPlist --convert binary1 --outdir /Users/andersonaddo/myappname/ios/build/myappname/Build/Products/Prod.Debug-iphonesimulator/Biteup.app -- /Users/andersonaddo/myappname/ios/GoogleService-Info.plisterror: Build input file cannot be found: '/Users/andersonaddo/lunchme/ios/GoogleService-Info.plist' (in target 'biteup' from project 'biteup')

Does anyone have any idea why this behaviour may be happening? If i try and build again after the first failure, I don't run into this issue because the copied file remains in the ios directory from the first attempt.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>