Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,23 @@ 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]
2. Configure your iOs app sigIn.
- 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/)
Expand Down
2 changes: 1 addition & 1 deletion app/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +4 to 5
FLUTTER_BUILD_NUMBER=1
FLUTTER_APP_ID=base
Expand Down
4 changes: 2 additions & 2 deletions app/ios/qa.xcconfig
Original file line number Diff line number Diff line change
@@ -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
PREFIX=qa
Loading