Mobile Nebula
August 3, 2026 ยท View on GitHub
Setting up dev environment
Install all of the following things:
xcode- use the version specified byxcode_selectin/ios/fastlane/Fastfileandroid-studioflutter3.44.6gomobile- Flutter Android Studio Extension
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.exampleand 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 detailsbox, expand the NDK section and select28.2.13676358version. - Ensure you have downloaded an ndk via android studio, this is likely not the default one and you need to check the
Show package detailsbox to select the correct version. The correct version comes from the error when you try and compile - Make sure you have
geminstalled withsudo gem install - If on MacOS arm,
sudo gem install ffi -- --enable-libffi-alloc
If the iOS build complains that MobileNebula.xcframework is stale or missing, run ./ensure-mobile-nebula.sh from the repo root. It rebuilds the gomobile framework only when the Go code in nebula/ changes, Xcode runs it automatically as a pre-build action on the Runner scheme.
Building from Xcode after a flutter command
flutter pub get, flutter test and friends rewrite the generated plugin package with flutter's own iOS 13 minimum,
which SPM then rejects because file_picker needs 14:
error: The package product 'file-picker' requires minimum platform version 14.0 for the iOS platform,
but this target supports 13.0
Only a flutter CLI build puts it back, so run this before building in Xcode:
flutter build ios --config-only
ensure-mobile-nebula.sh also does it, but Xcode resolves packages before pre-actions run, so it only helps the next
build. Skip the command and the first build fails, the second works.
Formatting
dart format can be used to format the code in lib and test. We use a line-length of 120 characters.
Use:
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.