From 695d2b9682d4b31781d119f36cd8e0cb88f20303 Mon Sep 17 00:00:00 2001 From: Amaury Ricardo Date: Tue, 22 Sep 2026 16:51:24 -0300 Subject: [PATCH] fix(ios): point flavor xcconfigs at existing entrypoints - Release.xcconfig: FLUTTER_TARGET referenced lib/main/env/main.dart, which does not exist; the prod entrypoint is lib/main.dart. - qa.xcconfig: the QA flavor ran main_dev.dart (and PREFIX=dev); use main_qa.dart / PREFIX=qa. - README: build commands used the same missing path, a nonexistent env_prod.json, and `appBundle` (the subcommand is `appbundle`). Co-Authored-By: Claude Opus 5.5 (1M context) --- README.md | 8 ++++++-- app/ios/Flutter/Release.xcconfig | 2 +- app/ios/qa.xcconfig | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 93f6c8a..1693f22 100644 --- a/README.md +++ b/README.md @@ -142,11 +142,15 @@ this [here](https://docs.page/bizz84/complete-flutter-course/faq/android-build-g ## Build Production App: +The production entry point is `lib/main.dart`. Run the commands from `app/`. The env file passed to +`--dart-define-from-file` must define `ENV=prod`, because `init.dart` then loads `env/.prod` as the dotenv file. +Create `app/env/.prod` first (following `app/env/.dev`) and don't commit real secrets. + 1. Build your android appBundle or apk: - run the following command to build your appBundle ```text - flutter build appBundle -t lib/main/env/main.dart --dart-define-from-file=env_prod.json + flutter build appbundle -t lib/main.dart --dart-define-from-file=env/.prod ``` [TODO: add how to setup Xcode for apple signIn] @@ -154,7 +158,7 @@ this [here](https://docs.page/bizz84/complete-flutter-course/faq/android-build-g - run the following command to build your ipa ```text - flutter build ipa --release -t lib/main/env/main.dart --dart-define-from-file=env_prod.json + flutter build ipa --release -t lib/main.dart --dart-define-from-file=env/.prod ``` For more information you can check the [docs](https://dartcode.org/docs/launch-configuration/) diff --git a/app/ios/Flutter/Release.xcconfig b/app/ios/Flutter/Release.xcconfig index 0735701..cb19d9a 100644 --- a/app/ios/Flutter/Release.xcconfig +++ b/app/ios/Flutter/Release.xcconfig @@ -1,7 +1,7 @@ #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" -FLUTTER_TARGET=lib/main/env/main.dart +FLUTTER_TARGET=lib/main.dart FLUTTER_BUILD_NAME=2.0.0 FLUTTER_BUILD_NUMBER=1 FLUTTER_APP_ID=base diff --git a/app/ios/qa.xcconfig b/app/ios/qa.xcconfig index 3051004..1053c32 100644 --- a/app/ios/qa.xcconfig +++ b/app/ios/qa.xcconfig @@ -1,9 +1,9 @@ #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" -FLUTTER_TARGET=lib/main/env/main_dev.dart +FLUTTER_TARGET=lib/main/env/main_qa.dart FLUTTER_BUILD_NAME=2.0.0 FLUTTER_BUILD_NUMBER=1 FLUTTER_APP_ID=base FLUTTER_APP_NAME=RS Base QA -PREFIX=dev \ No newline at end of file +PREFIX=qa \ No newline at end of file