limrun-xcode-bazel
Build a Bazel-based iOS / macOS / Apple app on Limrun's remote build execution (RBE) instead of a local Mac, and install it on a remote iOS simulator. Use when the project is a Bazel workspace (MODULE.bazel / WORKSPACE) building rules_apple / rules_swift targets and the user wants to `bazel build` it or run it on a simulator, or when a `--config=limrun` build or install misbehaves. To then tap, type, screenshot, or otherwise interact with the running app, use limrun-ios-simulator. For non-Bazel (plain xcodebuild) projects use limrun-xcode instead.
Resumen
Bazel iOS builds on Limrun RBE
Build Bazel Apple projects on Limrun's remote Mac workers — from any environment (Linux, Windows, macOS, VM, container), no local Xcode. lim xcode rbe brings up a remote RBE stack, tunnels it to a local port, and writes a .limrun/ config so bazelisk build --config=limrun runs Apple actions remotely. Local Xcode and local build tools are not part of this workflow.
Auth and CLI
Install if needed: npm install --global lim. Auth is lim login or LIM_API_KEY (it may already be set in the user's environment even when the shell does not show it; check before asking for it). The CLI is the source of truth: the commands in this skill are verified, but if a flag errors or you need one not shown here, check lim xcode rbe --help instead of guessing.
Build
- From the Bazel workspace root (has
MODULE.bazel/WORKSPACE), runlim xcode rbe. It sets up the instance +.limrun/config and prints the exact build command. The tunnel runs in the background (prints a PID);--no-daemonkeeps it foreground. - Run the printed command, e.g.
bazelisk --digest_function=sha256 build --config=limrun //App.
Don't hand-write .limrun/ or the flags — the CLI generates them for the sandbox's Xcode and your OS. lim xcode version set 27 (or the one-off lim xcode rbe --xcode-version 27) builds with another installed Xcode: a bare major binds that major's GA release, a major.minor such as 27.1 pins that exact version (the beta). Re-run lim xcode rbe (after --stop) to refresh after a fleet Xcode upgrade or an Xcode switch.
To add your own Bazel flags to the limrun path without editing the generated config, put them in user.limrun.bazelrc at the workspace root. The generated config try-imports it last, so your build:limrun --… lines win, and it survives lim xcode rbe regeneration (.limrun/ does not).
Run on a simulator
lim xcode rbe is build-only; attach a simulator when the user wants to see or run the app. Check or attach (it installs the last build immediately, so no rebuild is needed):
lim xcode get # is a simulator already attached?
lim ios create --attach # attach oneAdd --no-open when you have no browser to show the user; it skips opening the stream URL locally and still prints it for sharing.
If the attach output includes a signed stream URL, share it with the user as a Markdown link, such as [Live simulator](<signed-stream-url>).
With a simulator attached, every successful --config=limrun build automatically reinstalls and relaunches the app, no separate install step:
bazelisk --digest_function=sha256 build --config=limrun //AppNotes:
- Attach upfront if you already know you want a sim:
lim xcode rbe --ios(attaches at startup, removed on--stop). - Auto-install happens server-side from the build's events; there is no
lim xcode rbe installsubcommand or--targetflag. To force a reinstall, rebuild (a cache-hit rebuild is seconds). - It fires when the successful invocation produced a single app, so in a multi-app workspace build one app target per invocation (
//App, not//...); a multi-app build succeeds but installs nothing.
To tap, type, read the element tree, screenshot, or record the running app, switch to the limrun-ios-simulator skill.
Upload builds as assets
To publish a build as a Limrun asset (preview links, installing on other simulators, CI artifacts), arm uploads at tunnel start or upload one build after the fact:
lim xcode rbe --auto-upload preview/my-app --upload-ttl 24h # every successful build refreshes the asset
lim xcode rbe upload preview/my-app --ttl 24h # one-shot: the newest successful build--auto-uploadholds for the tunnel's lifetime: each successful--config=limrunbuild re-uploads the app under that asset name, no post-build step. Upload results land in.limrun/rbe.log.rbe uploadruns from the workspace root and needs a background tunnel plus at least one successful build; it errors otherwise.- TTLs are Go durations (
24h,30m;1dis invalid) and optional; each upload without one pushes the asset's expiry to 14 days from that upload. - To change the
--auto-uploadconfig of a running tunnel,--stopand re-run; the CLI refuses a mismatched re-arm instead of silently ignoring it. - Preview an uploaded app in a browser at
https://console.limrun.com/preview?asset=<name>&platform=ios.
Teardown
Stop with lim xcode rbe --stop (~20s to tear the remote stack down) and delete the instance with lim xcode delete <id>
Gotchas
- Always pass
--digest_function=sha256beforebuild(use the command the CLI prints verbatim). The Limrun cache is SHA256-only; Bazel 9 defaults to BLAKE3. It's a startup flag, so it can't live in--config=limrun. Symptoms: build →Cannot use hash function BLAKE3 with remote cache; install →non-SHA256 digest … rebuild with --digest_function=sha256. - Run
lim xcode rbefrom the workspace root, not a subdirectory — it writes.limrun/there and fails fast otherwise. - A green build doesn't prove remote execution — cache hits (
action cache hit/remote cache hit) make builds pass even with the tunnel gone. To force and verify real remote execution, seereferences/verify-remote.md. - The printed
.ipapath won't exist on your machine — the build command carries--remote_download_outputs=minimal, which keeps the artifact in the instance's cache and downloads nothing. Bazel still prints its usualTarget //App:App up-to-date: …/App.ipaline, but that file is not on disk. This is expected, not a failed build. With a simulator attached, the build auto-installs from the artifact's cache digest (read from the build event log, not the local file). Only if you genuinely need the.ipalocally, drop--remote_download_outputs=minimalfrom the build command and Bazel downloads the top-level output; auto-install keeps working either way. - A fresh instance can fail the first build with
Lost inputs no longer available remotely(e.g.… Assets.car). It's a transient cache eviction between instances, not a code error; Bazel printsFound transient remote cache error, retrying the build...and the retry succeeds. To avoid hitting it mid-demo, pre-warm with a full build right afterlim xcode rbe. You don't have permission to save … in "CoreSimulator"(actool/ibtool) is a fleet-side device gap, not your config. Retry; if it persists, report it to Limrun.- The project's own Bazel settings can fight RBE (Xcode pinned via a Starlark transition, custom
remote_default_exec_properties, sandbox-hostile genrules). These are per-project, not Limrun bugs — walkreferences/project-compatibility.mdbefore concluding RBE is broken.
Archivos 3 archivos
Instálala a mano
Deska ejecuta esto por ti, para cada agente que elijas. Para ejecutarlo tú en una terminal:
npx skills add limrun-inc/skills --skill limrun-xcode-bazelMás de limrun-inc
- limrun-detox-testinglimrun-incConfigure, run, or debug Detox on Limrun iOS simulators. Use when attaching the Limrun Detox runtime to an app, wiring Detox mediator connectivity, or validating app/tester connections over destination tunnels.10.1 k instalaciones en skills.sh0
- limrun-expo-developmentlimrun-incPrepare and run Expo / React Native apps on Limrun with Expo dev-client iteration. Use when the user wants an Expo dev build, Metro tunnel, hot reload, JS/TS iteration without repeated native rebuilds, or to run/test an Expo app on a remote iOS simulator or Android emulator.10.1 k instalaciones en skills.sh0
- limrun-ios-simulatorlimrun-incDrive an app running on a Limrun cloud iOS simulator: launch, tap, type, read the accessibility element tree, read app logs and simulator syslog, screenshot, record video, connect the app to local services, play a video file as the camera, set the clipboard, read and write user defaults, post notifications, and run timed action chains. Use after a build (from any builder) when the user wants to see, test, or interact with their app on a simulator, or says 'show me a screenshot', 'tap', 'run the UI test', 'record a video', 'read the logs', 'connect localhost', 'reach my local server from the simulator', 'mock the camera', 'paste into the app', 'change the language', 'simulate Face ID', or 'launch on simulator'. To build the app first, use limrun-xcode-bazel (Bazel workspaces) or limrun-xcode (xcodebuild projects).10.1 k instalaciones en skills.sh0
- limrun-xcodelimrun-incBuild an iOS / Apple app on remote Xcode with `lim xcode build` instead of local xcodebuild, run project commands with `lim xcode run`, or run its XCTest suites with `lim xcode test`, from any environment (Linux, Windows, macOS, VM, container). Use for non-Bazel projects (an `.xcodeproj` / `.xcworkspace`, an XcodeGen `project.yml` with a gitignored project, React Native / Expo native build) when the user wants to build, compile, run code generation or Make targets, test, inspect build logs, reload, produce a preview build, or ship a signed device IPA. To run, tap, screenshot, or otherwise interact with the result on a simulator, use limrun-ios-simulator. For Bazel workspaces, use limrun-xcode-bazel.10.1 k instalaciones en skills.sh0
- limrun-maestro-testinglimrun-incRun Maestro YAML flows against a Limrun cloud iOS simulator with `lim ios maestro`, from any environment (Linux, Windows, macOS, VM, container). Use when the user wants to run, write, or debug Maestro flows or `maestro test` on iOS, migrate an existing Maestro suite to remote simulators, or asks for UI testing with Maestro. iOS simulators only today. For Detox suites use limrun-detox-testing; for driving the simulator without a test framework use limrun-ios-simulator.8,200 instalaciones en skills.sh0