Repository navigation
Description
Two related gaps in app/setup.sh, both verified by reading main at 015172400b. Neither is a niche edge case: they are what a new contributor hits before any of the app code matters.
1. run_build_ios() never pins a target device
app/setup.sh:241-249:
function run_build_ios() {
local flavor="${1:-dev}"
shift || true
flutter pub get \
&& pushd ios && pod install --repo-update && popd \
&& dart run build_runner build \
&& flutter run --flavor "$flavor" "$@"
}There is no -d, so Flutter picks a device itself. When I ran bash setup.sh ios on a Mac with no iOS simulator runtime installed and only a wirelessly paired iPhone visible, Flutter selected the macOS desktop target and the run died:
Launching lib/main.dart on macOS in debug mode...
Error: No macOS desktop project configured. See https://flutter.dev/to/add-desktop-support
Exit code 1 — so it does fail loudly, which is good; the problem is that a command explicitly told ios spent a full pod install --repo-update and build_runner pass and then reported an error about macOS, a platform the contributor never mentioned. The diagnosis ("you have no simulator runtime") is nowhere in the output.
Attribution note, so this is not misread: I was on Xcode 27.0 / Flutter 3.44.9, ahead of the versions the script prints (Xcode 16.4). Which fallback target Flutter chooses is version- and environment-dependent. The gap being reported is the version-independent one: run_build_ios() pins no device and the script never checks that an iOS destination exists, so the failure mode is "silently build something else" rather than "tell me what's missing."
Suggested shape: pass -d explicitly, or fail up front with something like "no iOS device or simulator found — boot a simulator or connect a device."
2. setup.sh prints a prerequisite list and validates none of it
setup.sh:29-51 prints:
For iOS Developers:
- Xcode (v16.4)
- CocoaPods (v1.16.2)
…and the entire script contains exactly one command -v check — for fastlane, at setup.sh:145, inside setup_provisioning_profile(). Nothing verifies Xcode, CocoaPods, Flutter, or their versions. A missing or wrong-version prerequisite therefore surfaces as a confusing downstream failure instead of a named error.
The repo already has the pattern worth copying, in the harness. make dev-up refuses to start and names every missing prerequisite with both remedies:
Cannot start; missing prerequisites:
- OPENAI_API_KEY (openai; set in backend/.env.local-dev or use PROVIDER_MODE=offline)
...
- docker daemon (docker CLI present but `docker info` failed; start Docker/colima
or install typesense-server for OMI_TYPESENSE_RUNTIME=native)
That is exemplary — it names the thing, where to set it, and the escape hatch. (Both of those are real outputs I hit today; the second is what a fresh reboot with colima stopped produces.) setup.sh never got the same treatment.
Both gaps push the same cost onto newcomers: the script knows what it needs, prints what it needs, and then declines to check, so the first signal of trouble is an unrelated error several minutes into a build.
Found while running the documented iOS pathway end-to-end from a fresh clone as a new contributor would. Related but distinct: #11534 (build succeeds, then hangs on splash when the harness isn't running) and #11774 (OMI_DEV_HOST cannot make the harness reachable from a device).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn review
Activity
fix(app): pin an iOS build destination and validate prerequisites (#1…