I am develop Flutter mobile app with Firebase.
I need separate Firebase environment for development and production.
I am follow this guide for setup.
Issue is when I implement google authentication for iOS because in Runner must copy REVERSED_CLIENT_ID from GoogleServices-Info.plist into Info.plist file.
I cannot just hardcode this REVERSED_CLIENT_ID into Info.plist because it is different for my development and production environments.
Is there way to specify variable in Info.plist to get correct REVERSED_CLIENT_ID for different environments?
I am use this script to copy correct GoogleServices-Info.plist:
if [ "${CONFIGURATION}" == "Debug-prod" ] || [ "${CONFIGURATION}" == "Release-prod" ] || [ "${CONFIGURATION}" == "Release" ]; then
cp -r "${PROJECT_DIR}/Runner/Firebase/Prod/GoogleService-Info.plist" "${PROJECT_DIR}/Runner/GoogleService-Info.plist"
echo "Production plist copied"
elif [ "${CONFIGURATION}" == "Debug-dev" ] || [ "${CONFIGURATION}" == "Release-dev" ] || [ "${CONFIGURATION}" == "Debug" ]; then
cp -r "${PROJECT_DIR}/Runner/Firebase/Dev/GoogleService-Info.plist" "${PROJECT_DIR}/Runner/GoogleService-Info.plist"
echo "Development plist copied"
fi
I look for answer everywhere but cannot find! I am completely block because of this.
Thanks!