Llim.run

Build an iOS app with Bazel from Claude Code on the web

Ask Claude Code on the web to change a Bazel iOS app, watch the change land on a cloud iOS simulator, and review it in a pull request with a preview link. Every Apple build action runs on Limrun's remote Macs through Bazel remote build execution, so neither you nor the session VM needs a Mac or Xcode.

Before you start

Open limrun-inc/ios-bazel-template, click Use this template, then Create a new repository. The template is a small SwiftUI chat app built with rules_apple and rules_swift. Its assistant replies are canned, so it needs no network or API key of its own.

The ios-bazel-template repository page with the Use this template menu open, showing Create a new repository

Your copy includes an iOS Preview workflow that builds every pull request and comments with a preview link. GitHub copies the workflow but not the secrets, so add the key yourself. The command prompts for the value:

gh secret set LIM_API_KEY --repo <owner>/<repo>

Without the GitHub CLI, add it under Settings, Secrets and variables, Actions in your copy.

The session VM doesn't ship bazelisk. Edit the limrun environment and add @bazel/bazelisk to the install line of its setup script:

#!/bin/bash
npm install --global lim @bazel/bazelisk
lim skills install --agents claude --scope global
Setup script field with npm install --global lim @bazel/bazelisk and the lim skills install line

Start a new session on your copy with the limrun environment, and send:

Build this app with Limrun and show it to me on an iOS simulator.

Following the limrun-xcode-bazel skill, Claude runs lim xcode rbe to start a remote build stack, attaches a simulator, and builds with the command the CLI prints. The first build took about a minute in our run, with the Apple actions executing on the remote Macs:

Session output of bazelisk --digest_function=sha256 build --config=limrun //App finishing with 35 remote processes and Build completed successfully

The successful build installs the app on the attached simulator. Claude's reply includes a screenshot and a link to the live simulator:

Claude's reply with a screenshot of the chat app on the simulator, a Live simulator link, and a summary of the build

Open the link to use the app in your browser:

The live simulator in the browser running the chat app, with live events, app logs, and network request panels

Keep the simulator open and ask for a visible change:

Change the title to "Hello from Claude" and make my message bubbles orange, then show me.

Claude edits the Swift source and the asset catalog, then rebuilds. Bazel reuses the cached actions from the first build, so the rebuild took under 10 seconds in our run. The app reinstalls and relaunches on the simulator you have open. Claude also commits the change and pushes it to a new branch:

Claude's reply with a screenshot of the app titled Hello from Claude with orange bubbles, the pushed branch, and a Create PR button
The live simulator showing the app with the Hello from Claude title and orange message bubbles

Click Create PR in the session bar. The pull request opens under your GitHub account, which starts the iOS Preview workflow.

Session bar showing pull request number 1 for the Claude branch with a CI status indicator

When the workflow finishes, about two minutes in our run, it comments on the pull request with a preview link:

Pull request with the Limrun Preview comment linking to the preview for the commit, and the passing iOS Preview check

Open Preview runs the build from the pull request on a simulator in the Limrun console. Reviewers need to be members of your Limrun organization to open it.

Limrun console preview running the changed app with the Hello from Claude title and orange bubbles

Clean up

The Xcode sandbox and the simulator delete themselves after your organization's inactivity timeout, so closing the session is enough. To stop them right away, ask Claude to run lim xcode rbe --stop before you close the session.

Use your own Bazel project

The same flow works on your own Bazel workspace once the limrun environment has bazelisk. Start from Build with Bazel for what lim xcode rbe configures, and copy .github/workflows/ios-preview.yml from the template to get preview links on your own pull requests; Automatic PR Previews covers its options.

Next steps

zap

Build with Bazel

Remote build execution, uploads, and CI for Bazel workspaces.

git-pull-request

Automatic PR Previews

Preview links on every pull request, for Bazel and xcodebuild projects.