Skip to content

Instantly share code, notes, and snippets.

@Moistbobo
Created October 9, 2021 09:16
Show Gist options
  • Save Moistbobo/cfd7490d965928f398f226e67df79e25 to your computer and use it in GitHub Desktop.
Save Moistbobo/cfd7490d965928f398f226e67df79e25 to your computer and use it in GitHub Desktop.
RN - IOS GoogleInfo.plist build phase copy script
PATH_TO_CONFIG=$SRCROOT/Config/GoogleService-Info-$PRODUCT_BUNDLE_IDENTIFIER.plist
FILENAME_IN_BUNDLE=GoogleService-Info.plist
BUILD_APP_DIR=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app
echo cp $PATH_TO_CONFIG "$BUILD_APP_DIR/$FILENAME_IN_BUNDLE"
cp $PATH_TO_CONFIG "$BUILD_APP_DIR/$FILENAME_IN_BUNDLE"
@Moistbobo
Copy link
Author

Moistbobo commented Oct 18, 2021

Add this as an additional Build Phase script in the xcode project of a react native app.

Replace PATH_TO_CONFIG with the correct path to the GoogleService-Info file. Note that the script will fail if this path is incorrect.

source: https://stackoverflow.com/a/50731611/13772644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment