Enroll a Mac

Enroll a Mac with Xcode so Rehearsal knows it and the simulators it lists.

Enrolling a Mac is separate from connecting a web app. Connect a local app lets Rehearsal's browsers reach a website on your computer. An enrolled Mac tells Rehearsal that it is online and which simulators it has.

What works today Link to What works today

  • Enroll a Mac and keep it online with rehearsal host join.
  • See which Macs are online, whether each one is free or in use, and the simulators it lists.
  • Retire a Mac to end its access to Rehearsal.

Not yet Link to Not yet

  • Rehearsal does not run tests or explorations on an enrolled Mac yet.
  • A Mac does not report the app builds it has.

Before you start Link to Before you start

  • The CLI is installed on the Mac.
  • Xcode is installed, for the simulators. A Mac without Xcode can join and lists none.
  • Enrolling and retiring need the hosts scope and Manage projects. Listing Macs needs testing:read and View projects.

rehearsal login does not ask for hosts. A new sign-in replaces the old one, so name hosts beside the scopes you already use:

Terminal
rehearsal login --scope tunnel --scope testing:read --scope testing:run --scope hosts

Enroll a Mac Link to Enroll a Mac

  1. Step 1: Ask for a code

    Terminal
    rehearsal hosts enroll --name "Office Mac" --workspace <workspace-id>

    This prints a code and the command to run on the Mac. The code works for fifteen minutes.

  2. Step 2: Join on the Mac

    Terminal
    rehearsal host join --api https://api.rehearsal.dev -- <code>

    The code comes after --. Keep the command running: it reports the Mac every thirty seconds.

  3. Step 3: Check that it is online

    Terminal
    rehearsal hosts list --workspace <workspace-id> --json

Keep it online Link to Keep it online

Press Ctrl+C to stop rehearsal host join. Rehearsal shows the Mac offline within three minutes. Run rehearsal host join without a code to resume.

The Mac keeps its own credential in ~/.config/rehearsal/host.json, apart from your sign-in. rehearsal login and rehearsal logout leave it alone.

Simulators Link to Simulators

The Mac lists up to twenty available simulators, each name once on its newest runtime. Newer runtimes come first.

Retire a Mac Link to Retire a Mac

Terminal
# Anywhere you are signed inrehearsal hosts retire "Office Mac" --workspace <workspace-id># Then on the Mac, after stopping host joinrehearsal host forget --yes

Retiring is permanent. To join the same Mac again, give it a new name and ask for a new code.

Next steps Link to Next steps