mobile_nebula/README.md
Ian VanSchooten a8303a166d
Update github runners to use macos 15 / xcode 16 (#276)
According to https://github.com/actions/runner-images#available-images, currently `macos-latest` is pointing to macos 14 images, which come bundled with xcode 15.  Apple now requires xcode 16, which we'll get by updating to `macos-15`.  

This also bumps the version github uses to `16.3` (by default it will stay at 16.0), and adds a note to the README that ideally we should all be using the same version of xcode that is used to build the app that is sent to Apple.

We could get fancier with this, but I don't think it's really necessary right now.  See https://www.polpiella.dev/managing-xcode-installs-using-fastlane for other approaches.
2025-05-07 10:29:48 -04:00

62 lines
2.8 KiB
Markdown

# 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)
## Setting up dev environment
Install all of the following things:
- [`xcode`](https://apps.apple.com/us/app/xcode/) - use the version specified by `xcode_select` in `/ios/fastlane/Fastfile`
- [`android-studio`](https://developer.android.com/studio)
- [`flutter` 3.29.2](https://docs.flutter.dev/get-started/install)
- [`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
Run `flutter doctor` and fix everything it complains before proceeding
*NOTE* on iOS, always open `Runner.xcworkspace` and NOT the `Runner.xccodeproj`
### Before first compile
- Copy `env.sh.example` and set it up for your machine
- Ensure you have run `gomobile init`
- 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.
- Ensure you have downloaded an ndk via android studio, this is likely not the default one and you need to check the
`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`
- If on MacOS arm, `sudo gem install ffi -- --enable-libffi-alloc`
If you are having issues with iOS pods, try blowing it all away! `cd ios && rm -rf Pods/ Podfile.lock && pod install --repo-update`
# Formatting
`dart format` can be used to format the code in `lib` and `test`. We use a line-length of 120 characters.
Use:
```sh
dart format lib/ test/ -l 120
```
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.
`./swift-format.sh` can be used to format Swift code in the repo.
Once `swift-format` supports ignoring directories (<https://github.com/swiftlang/swift-format/issues/870>), we can move to a method of running it more like what <https://calebhearth.com/swift-format-github-action> describes.
# Release
Update `version` in `pubspec.yaml` to reflect this release, then
## Android
`flutter build appbundle`
This will create an android app bundle at `build/app/outputs/bundle/release/`
Upload the android bundle to the google play store https://play.google.com/apps/publish
## iOS
In xcode, Release -> Archive then follow the directions to upload to the app store. If you have issues, https://flutter.dev/docs/deployment/ios#create-a-build-archive