Skip to content

feat(ios): build the simulator jail's library, host tool and profile (#1648) - #1649

Draft
V3RON wants to merge 2 commits into
mainfrom
research/isolate-ios-simulators
Draft

V3RON wants to merge 2 commits into
mainfrom
research/isolate-ios-simulators

Conversation

@V3RON

@V3RON V3RON commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Refs #1648.

Adds the three files of the iOS simulator sandbox and builds them. Nothing in the driver uses them yet, so no behaviour of simlock changes.

  • src/drivers/ios/jail/Jail.swift becomes dist/jail/libsimlock-jail.dylib. Loaded into launchd_sim at boot, it applies a compiled sandbox profile; every process of the simulator inherits it.
  • main.swift becomes dist/jail/simlock-jail: compile turns the profile into those bytes, check says whether processes are sandboxed.
  • profile.sb is the allow-list, shipped as text and compiled per simulator from named values.
  • scripts/build-capture.mjs compiles each binary for arm64 and x86_64 with swiftc and joins the slices with lipo.

Checked by hand on macOS 26.6, Xcode 27.2, the iOS 27.2 runtime, Apple silicon, with the built files:

  • two simulators booted jailed; simlock-jail check passed for launchd_sim and every child
  • Settings, open URL, pasteboard, log stream, an XCTest run and an agent-device session worked
  • an app in one simulator was refused the worker's home, the other simulator's data and sockets, loopback, host programs and host services
  • the x86_64 slice of simlock-jail compiles the profile to the same bytes under Rosetta

Open:

Written by an agent.

…1648)

Adds src/drivers/ios/jail/ (Swift) and builds it into dist/jail/ for arm64
and x86_64: a library that puts a simulator under a sandbox profile at boot,
the simlock-jail program that compiles the profile and checks a process is
sandboxed, and the profile itself. Nothing in the driver uses them yet.
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant