You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: remove stale build command references, use native build tools
android.sh build and ios.sh build were intentionally removed. Replace
all references with native tool commands (gradle assembleDebug,
xcodebuild, ios.sh xcodebuild wrapper). Update deploy.sh fallbacks to
error instead of calling non-existent commands.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
-`devbox run --pure android.sh emulator start [--pure] [device]`
@@ -150,7 +107,7 @@ android.sh app stop
150
107
2. Recursive search of project root for `*.apk` files (excludes .gradle/, build/intermediates/, node_modules/, .devbox/)
151
108
3. Recursive search of `$PWD` if different from project root (same exclusions)
152
109
153
-
**Build script detection:** Tries `build:android` first, then falls back to `build`. If neither script exists, it runs `android.sh build` to auto-detect and build the Gradle project.
110
+
**Build script detection:** Tries `build:android` first, then falls back to `build`. Define a build script in `devbox.json` using native tools (e.g., `gradle assembleDebug`).
- Auto-detects Xcode project (.xcworkspace preferred over .xcodeproj)
135
-
- Default action: `build`. Use `--action test` for xcodebuild tests.
136
-
- Calls `xcodebuild` directly (Nix vars are stripped at init time)
137
-
138
-
**Project detection order:**
139
-
1. Current working directory
140
-
2.`$DEVBOX_PROJECT_ROOT` (if different)
141
-
3.`$PWD/ios/` (React Native convention)
142
-
4.`$DEVBOX_PROJECT_ROOT/ios/` (if different)
143
-
144
-
Within each directory, prefers `.xcworkspace` over `.xcodeproj`. Scheme is derived from the project filename (e.g., `MyApp.xcodeproj` → `MyApp`), overridable via `--scheme` or `IOS_APP_SCHEME`.
145
-
146
-
**Examples:**
147
-
```bash
148
-
# Build with defaults (Debug, auto-detect project)
@@ -197,7 +147,7 @@ Use this in `devbox.json` build scripts instead of manually stripping Nix flags:
197
147
}
198
148
```
199
149
200
-
The iOS init hook (`devbox_omit_nix_env()`) strips Nix compilation variables at shell startup, so `xcodebuild` works natively in devbox shell. The `ios.sh xcodebuild` subcommand forwards directly to `xcodebuild`.
150
+
The iOS init hook strips Nix compilation variables at shell startup, so `xcodebuild` works natively in devbox shell. The `ios.sh xcodebuild` subcommand forwards directly to `xcodebuild`.
201
151
202
152
### Run App
203
153
@@ -217,7 +167,7 @@ ios.sh run [app_path] [device]
217
167
218
168
Bundle ID is auto-extracted from the .app's `Info.plist` via PlistBuddy, or from `xcodebuild -showBuildSettings` if available.
219
169
220
-
**Build script detection:** The `run` command tries `build:ios` first, then falls back to `build`. If neither script exists, it runs `ios.sh build` to auto-detect and build the Xcode project.
170
+
**Build script detection:** The `run` command tries `build:ios` first, then falls back to `build`. Define a build script in `devbox.json` using native tools (e.g., `xcodebuild`).
**Symptom**: Xcode build errors related to linker flags or Nix environment variables.
647
647
648
-
**Solution**: The iOS init hook now strips Nix compilation variables (`LD`, `LDFLAGS`, `NIX_LDFLAGS`, `NIX_CFLAGS_COMPILE`, `NIX_CFLAGS_LINK`) at shell startup, so `xcodebuild` works natively in devbox shell. If you still encounter issues, use `ios.sh build`which handles this automatically:
648
+
**Solution**: The iOS init hook strips Nix compilation variables (`LD`, `LDFLAGS`, `NIX_LDFLAGS`, `NIX_CFLAGS_COMPILE`, `NIX_CFLAGS_LINK`) at shell startup, so `xcodebuild` works natively in devbox shell. If you still encounter issues, use the `ios.sh xcodebuild` wrapper which strips these variables in a subshell:
649
649
650
650
```bash
651
-
ios.sh build
651
+
ios.sh xcodebuild -scheme MyApp build
652
652
```
653
653
654
-
The `ios.sh xcodebuild` wrapper is also available for backward compatibility when running outside devbox shell.
655
-
656
654
### Lock File Out of Sync
657
655
658
656
**Symptom**: "Warning: devices.lock may be stale" or checksum mismatch.
0 commit comments