I am using the below guide to set up a dev and prod environment for my project that uses flutter + firebase https://www.tengio.com/blog/multiple-firebase-environments-with-flutter/
I have set up my respective GoogleService-Info.plist under Firebase->dev and Firebase->prod folders
I have also added below script under my Xcode Target->Build Phases (before the compile sources)
if [ "${CONFIGURATION}" == "Debug-prod" ] || [ "${CONFIGURATION}" == "Release-prod" ] || [ "${CONFIGURATION}" == "Release" ]; then
cp -r "${PROJECT_DIR}/Runner/Firebase/prod/GoogleService-Info.plist" "${PROJECT_DIR}/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}/GoogleService-Info.plist"
echo "Development plist copied"
fi
I have tried:
flutter run --flavor dev
after
- Flutter clean and then running
- I went to Xcode Product -> Clean Build folder and then running
- I have also tried to delete the iOS -> Pods folder along with Podfile.lock and then running
I get this error:
error: Could not get GOOGLE_APP_ID in Google Services file from build environment
Any help to resolve is deeply appreciated
(Note: I have tried other stackoverflow solutions - still no luck)