2023-04-04 14:54:37 +00:00
# Mobile Nebula
[Play Store ](https://play.google.com/store/apps/details?id=net.defined.mobile_nebula&hl=en_US&gl=US ) | [App Store ](https://apps.apple.com/us/app/mobile-nebula/id1509587936 )
2022-09-21 20:27:35 +00:00
## Setting up dev environment
2020-12-07 21:10:31 +00:00
2022-09-21 20:27:35 +00:00
Install all of the following things:
- [`xcode` ](https://apps.apple.com/us/app/xcode/ )
2020-12-10 17:06:40 +00:00
- [`android-studio` ](https://developer.android.com/studio )
2025-01-10 17:13:48 +00:00
- [`flutter` 3.27.0 ](https://docs.flutter.dev/get-started/install )
2022-09-21 20:27:35 +00:00
- [`gomobile` ](https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile )
- [Flutter Android Studio Extension ](https://docs.flutter.dev/get-started/editor?tab=androidstudio )
Ensure your path is set up correctly to execute flutter
2020-12-10 17:06:40 +00:00
2022-09-21 20:27:35 +00:00
Run `flutter doctor` and fix everything it complains before proceeding
2021-04-22 22:46:16 +00:00
2022-09-21 20:27:35 +00:00
*NOTE* on iOS, always open `Runner.xcworkspace` and NOT the `Runner.xccodeproj`
2020-12-10 17:06:40 +00:00
2022-09-21 20:27:35 +00:00
### Before first compile
2020-12-10 17:06:40 +00:00
2022-09-21 20:27:35 +00:00
- Copy `env.sh.example` and set it up for your machine
- Ensure you have run `gomobile init`
2025-02-04 18:18:35 +00:00
- In Android Studio, make sure you have the current NDK installed by going to Tools → SDK Manager, go to the SDK Tools tab, check the `Show package details` box, expand the NDK section and select `27.0.12077973` version.
2025-02-05 17:35:04 +00:00
- Ensure you have downloaded an NDK via android studio, this is likely not the default one, and you need to check the
2022-09-21 20:27:35 +00:00
`Show package details` box to select the correct version. The correct version comes from the error when you try and compile
- Make sure you have `gem` installed with `sudo gem install`
2025-02-05 17:35:04 +00:00
- If on macOS arm64, `sudo gem install ffi -- --enable-libffi-alloc`
2022-09-21 20:27:35 +00:00
If you are having issues with iOS pods, try blowing it all away! `cd ios && rm -rf Pods/ Podfile.lock && pod install --repo-update`
2020-12-07 21:10:31 +00:00
# Formatting
2024-10-07 15:38:00 +00:00
`dart format` can be used to format the code in `lib` and `test` . We use a line-length of 120 characters.
2020-12-07 21:10:31 +00:00
Use:
```sh
2024-10-07 15:38:00 +00:00
dart format lib/ test/ -l 120
2020-12-10 17:06:40 +00:00
```
2025-02-04 18:18:35 +00:00
In Android Studio, set the line length using Preferences → Editor → Code Style → Dart → Line length, set it to 120. Enable auto-format with Preferences → Languages & Frameworks → Flutter → Format code on save.
2024-10-07 15:38:00 +00:00
2025-02-04 18:18:35 +00:00
# Prerelease
2024-10-07 15:38:00 +00:00
2025-02-04 19:31:31 +00:00
Push a git tag `v#.#.#-##` , e.g. `v0.5.1-0` , and `.github/release.yml` will build a draft release and publish it to iOS TestFlight and Android internal track.
2020-12-07 21:10:31 +00:00
2025-02-04 18:18:35 +00:00
# Release
2020-12-07 21:10:31 +00:00
2025-02-04 19:31:31 +00:00
1. Manually promote a prerelease build from TestFlight and Android internal track to the corresponding public app stores.
2. Mark the associated draft release as published, removing the `-##` from it, ending with a release in the format `v#.#.#` , e.g. `v0.5.1` .
3. Remove the old draft releases that will never be published.
4. Add the notable changes to the app to the release summary, e.g.: < https: // github . com / DefinedNet / mobile_nebula / releases / tag / v0 . 5 . 1 > .