Skip to content

Commit

Permalink
Merge pull request #251 from privacybydesign/ivard-readme-build-flavors
Browse files Browse the repository at this point in the history
Docs: improve explanation of Android build flavors in README.md
  • Loading branch information
ivard authored Nov 6, 2023
2 parents bee9bd3 + f7103c8 commit f26ee25
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ attaching data to signed statements. These data can be relevant properties, such

* Create the irmagobridge: `./bind_go.sh`.

* Start an emulator or connect a device via USB and run the flutter project: `flutter run`. You can
also use Android Studio or Visual Studio Code for this step. On Android, sometimes the build flavor
is not picked up automatically. This can be identified when the flutter tool cannot
find the generated apk after building. In this case run `flutter run --flavor alpha`.
In case you run the flutter project via Android Studio, you
can specify the build flavor in the run configuration. On iOS, no custom flavor should be specified.
* Start an emulator or connect a device via USB and run the flutter project: `flutter run` (iOS) or
`flutter run --flavor alpha` (Android). You can also use Android Studio or Visual Studio Code for this step.
The alpha flavor on Android does not open universal links. If you need to test these, you need to build
the beta flavor (`flutter run --flavor beta`). In order to install a beta flavor build, you need to uninstall
the Play Store version of the Yivi app. Therefore, it is practical to only do this in a simulator or a dedicated
test device. In case you run the flutter project via Android Studio, you can specify the build flavor in the
run configuration. On iOS, no custom flavor should be specified.

* You can use `flutter run -t` to run different app configurations, for example run `flutter run -t lib/main_prototypes.dart` to start the app in the prototypes menu.

Expand Down Expand Up @@ -168,7 +169,8 @@ workflows in .github/workflows). Documentation about the Fastlane scripting can
You can also make a symlink in `ANDROID_HOME` by doing
`ln -s $ANDROID_HOME/ndk/<NDK_VERSION> $ANDROID_HOME/ndk-bundle`. In here `<NDK_VERSION>` should be replaced
with the NDK version you want to use.
* When you get an error related to `x_cgo_inittls` while running `./bind_go.sh`, you probably use an incorrect version of the Android NDK (see above) or your Go version is too old.
* When you get an error related to `x_cgo_inittls` while running `./bind_go.sh`, you probably use an incorrect version of the Android NDK or your Go version is too old.
* When the flutter tool cannot find the generated apk after building for Android, the flavor is probably omitted. You need to run `flutter run --flavor alpha` or `flutter run --flavor beta`.
* When you are working with Windows, you need to manually make a symlink between the configuration folders. You can do this by opening a terminal as administrator and use the following command: `mklink /d .\android\app\src\main\assets\irma_configuration .\irma_configuration`.
* When you are building for iOS using XCode and you get `Dart Error: Can't load Kernel binary: Invalid kernel binary format version.`, then likely your Flutter cache is corrupted. You can empty and reload the Flutter cache in the following way:
```shell
Expand Down

0 comments on commit f26ee25

Please sign in to comment.