Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Vibhashkumar2022/13d7fa201cfbe3eb78ff18d096efb411 to your computer and use it in GitHub Desktop.
Save Vibhashkumar2022/13d7fa201cfbe3eb78ff18d096efb411 to your computer and use it in GitHub Desktop.
FirebaseConfiguration.js
# Type a script or drag a script file from your workspace to insert its path.
# Name of the resource
GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist
# Get references to dev and prod versions of the GoogleService-Info.plist
# CONFIGURATION = selected scheme Dev/QA/Staging/Prod
GOOGLESERVICE_INFO_PATH=${PROJECT_DIR}/${TARGET_NAME}/Firebase/${CONFIGURATION}/${GOOGLESERVICE_INFO_PLIST}
# Make sure the stg & prod version of GoogleService-Info.plist exists
echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_PATH}"
if [ ! -f $GOOGLESERVICE_INFO_PATH ]
then
echo "No ${CONFIGURATION} GoogleService-Info.plist found. Please ensure it's in the proper directory."
exit 1
fi
# Get a reference to the destination location for the GoogleService-Info.plist
PLIST_DESTINATION=${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app
echo "**** it will Will copy ${GOOGLESERVICE_INFO_PLIST} to final destination: ${PLIST_DESTINATION} ****"
echo "-> Using ****** ${GOOGLESERVICE_INFO_PATH}"
echo "-> Selected Configuration ****** ${CONFIGURATION}"
cp "${GOOGLESERVICE_INFO_PATH}" "${PLIST_DESTINATION}"
# Copy over the GOOGLESERVICE_INFO_PATH of GoogleService-Info.plist for Debug builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment