Drive the simulator
For AI agents: this page is Markdown at https://squiggle.sh/docs/studio/device.md. Every docs page is listed at https://squiggle.sh/llms.txt, and all of them are one file at https://squiggle.sh/llms-full.txt.
Studio shows the simulator live, in the device's real frame. Click, drag, scroll and type on it from your Mac, press its buttons, and change its settings.
Use the app
Both of these are on by default, in the device panel’s Interaction menu:
| Toggle | What it does |
|---|---|
| Pointer interaction | Your clicks, drags and scrolls drive the simulator. Turn it off to look without touching. |
| Keyboard capture | Your Mac’s keystrokes go to the simulator while it has focus. Click the simulator to give it focus; click anywhere else in Studio to take it back. |
Touch and scroll
| To | Do this |
|---|---|
| Tap | Click. |
| Drag or swipe | Click and drag. |
| Scroll | Scroll with your trackpad or mouse wheel over the screen. It moves a finger on the simulator, so lists scroll, bounce and snap as they do under a real finger, and a long scroll keeps going. Over a Studio popover drawn on the screen, such as the notifications, the popover scrolls instead. |
| Go home or back | Drag up from the bottom edge, or in from the left edge, as you would with a finger. |
| Press a button | Home, Lock, the volume buttons and Shake are in the Hardware menu. With the real device frame, you can also press the side buttons on it. |
Type
| Key | What happens |
|---|---|
| Letters, numbers, symbols | Typed into the focused field, with your keyboard layout and capitals. |
| Return | Presses the keyboard’s return key: it submits a form or runs the field’s submit action, as the app decides. |
| Tab | Sent to the app. iOS only moves to the next field if the app handles Tab itself. |
| Delete, arrows, Escape, Page Up and Down | Sent as the same keys on a hardware keyboard. |
| ⌘ C and ⌘ V | Copy and paste between your Mac and the simulator. |
| Other ⌘ and ⌃ shortcuts | Sent to the app, such as ⌘A to select all. Studio’s own shortcuts keep working. |
These are real touches and key presses, the same as using the simulator directly.
Keep the on-screen keyboard
iOS hides its on-screen keyboard once you type from a hardware keyboard. Turn on Keep software keyboard in the Interaction menu to keep it showing. It needs Squiggle running in the app, and is remembered for each device, including after the app relaunches.
You don’t need Studio to change it. Run squiggle device keyboard on, or have your agent call the device tool with softKeyboard: true. All three change the same setting, so squiggle flow runs and your agent’s runs keep the keyboard showing too. squiggle device keyboard off types as a hardware keyboard everywhere, your agent included, until you turn it on again. squiggle device keyboard default forgets either setting: your agent opens the keyboard again, and flows type as a hardware keyboard.
Your agent sees the keyboard as a person does: when it taps or types into a field, the on-screen keyboard opens and stays up while it types, with no setting to change. Flows type as a hardware keyboard unless the setting above is on. A flow can open the keyboard itself with a showKeyboard step on the field. To put it away, your agent uses the device tool with hideKeyboard: true, and a flow uses a hideKeyboard step.
Change the simulator’s settings
Three menus in the device panel change the simulator itself. When the simulator can’t report a value, the menu shows a dash instead of guessing.
| Menu | What it changes |
|---|---|
| System | Dark appearance, Increase contrast, text size (XS to AX5, and Reset to default for the standard size), and the status bar: Clean shows 9:41 with full signal and battery, Reset gives it back. |
| Location | A city, a moving route (City Run, City Bicycle Ride, Freeway Drive), or Clear location to set none. |
| Permissions | Grant or revoke each of the app’s permissions. Grant all grants every one. iOS closes the app to apply some changes, such as photos or microphone access, and it stays closed until you choose Relaunch app (see Switch and manage devices). Reset all clears every answer, so the app asks again the next time it needs a permission. |
You can change the same settings without Studio, from a terminal or from your agent’s device tool:
| Command | What it changes |
|---|---|
squiggle device appearance dark | Light or dark appearance. |
squiggle device contrast on | Increase contrast, on or off. |
squiggle device text-size larger | Text size: a size such as accessibility-large, one step larger or smaller, or default. |
squiggle device status-bar clean | Clean or reset the status bar. |
squiggle device location London | A place from the Location menu, latitude,longitude such as 45.815,15.9819, a route such as City Run, or clear. |
squiggle device permission grant location | Grant, revoke or reset one of the app’s permissions, or all of them. It uses the app your project declares; --bundle-id names another. When iOS closes the app to apply the change, such as any microphone or photos change, Squiggle opens it again on its first screen. With no app declared or named, only reset works, for every app, and an app iOS closes stays closed: start it again with squiggle up. |
squiggle device button home | Press Home, Lock, Volume up or Volume down. |
squiggle device shake | Shake the device. |
Leave the value off to see the current setting: squiggle device appearance prints dark.
Give your project a simulator of its own
When every booted simulator is running an app another Squiggle session is driving, commands stop with E_DEVICE_HELD. Create one for your project and boot it:
squiggle device simulator create --name "Checkout iPhone"With no options it uses the newest iOS version installed and its current iPhone. --type picks another model and --runtime another iOS version; squiggle device simulator list prints both, and every simulator with its UDID. The command prints the new simulator’s UDID: put it in "udid" in .squiggle/config.local.jsonc, this Mac’s own settings for the project, or pass --udid. A new simulator has no apps, so install your development build on it before you run a flow: run your build command with that UDID, or xcrun simctl install <udid> <path to .app>.
squiggle device simulator boot <udid> starts one that is shut down, and shutdown <udid> stops it again. Squiggle won’t shut down a simulator that Studio, an agent’s Squiggle server or a CLI run is driving, and it doesn’t delete simulators. Your agent does the same with the device tool’s simulator argument, then picks the simulator with target.
Save the screen you’re on
In the device panel’s Capture menu, Save slot saves the current screen and the data behind it, named by the time, such as studio-20261017-091504. Load a slot lists the newest eight and puts one back, so you start on a deep screen instead of tapping your way there. These are the same slots as squiggle save and squiggle load. For what a slot holds and why a load is refused, see Save and restore your app’s state. To find which saved values make a flow fail, see App state.
Take a screenshot or record the screen
In the Capture menu, Screenshot saves a PNG of the screen and copies the image to the clipboard, ready to paste. Record screen records a video until you choose Stop screen recording. Record session, in the same menu, records a session for Replay instead.
A notification says where the file was saved. Its Delete button removes the file, and Undo on the next notification brings it back within a few seconds.
Find them in the Gallery
Screenshots and screen recordings go to the Gallery (⌘ 0), newest first, beside the screenshots your agent takes. All, Screenshots and Screen recordings filter the grid. Open one to see it large; ← and → step through them and Esc goes back to the grid.
| In the viewer | What it does |
|---|---|
| Copy | Image copies a screenshot to paste into a PR, a chat or a bug. Path and File name copy those as text. |
| Open in Finder | Shows the file in Finder. |
| Delete | Also on each tile in the grid. Removes the file, with Undo for a few seconds. |
| Play | Shown for a recording when Studio can’t play it itself. Opens it in your default video player. |
The device frame
Studio draws your simulator in its real frame, read from your Xcode install. Devices with a home button, and a rotated device, get a drawn frame instead. In the Interaction menu, turn off Real device skin for the drawn frame everywhere, or Device bezel for no frame.
Zero-copy present, on by default, shows the simulator’s screen directly, at full resolution and with the least CPU. With it off, Studio streams a copy of the screen, and Full resolution streams that copy at the device’s native resolution instead of a smaller one; it is greyed out while Zero-copy present is on.
To save CPU while you aren’t watching, turn off Live stream in the same menu: the screen freezes on its last frame until you turn it back on.
Switch and manage devices
On the Devices screen, All, iPhone, iPad and, while a web app is listed, Web filter the list. Each row has Pin device, which keeps it at the top of the list (pins are remembered after Studio quits), and, on a booted simulator, Shut down device. Your project’s React web app is listed by its host (localhost:5173), as Not open until you choose it and Running once Squiggle’s window shows it; to close it, close that window. Your project’s macOS app reads Not running until you choose it. What a browser tab has in the device panel is in Watch and drive it in Studio.
The device menu, the device’s name at the top of the device panel, lists every booted device: pick one to show it. It also has:
| Item | What it does |
|---|---|
| Show all devices (N), Show focused device ⌘ G | Opens and closes the device grid. Shown when more than one simulator is booted. |
| Pin device, Unpin device | The same pin as on the Devices screen. |
| Reload JS | Reloads the app’s JavaScript from its development server. See Reload the app or open a link. |
| Relaunch app, Inject agent | Starts the app again from its first screen, with Squiggle in it: the app connected on this device, or else the iOS app your open project names (apps.ios, or bundleId, in .squiggle/config.jsonc). It reads Inject agent when the app is running without Squiggle. |
| Restart device | Restarts the simulator. |
| Shut down device | Shuts the simulator down. |
With more than one device booted, ⌘ D and ⌘ ⇧ D show the next and the previous one.
Check the connection
A chip at the top of the device panel says how Studio is connected to the app. Hover it for the device, the screen the app is on, and each part of the connection.
| Chip | What it means |
|---|---|
| ● live | The app is connected with Squiggle attached. |
| Waiting for app…, Connecting… | The app hasn’t connected yet, or is connecting. Launch it from the Devices screen if nothing changes. |
| Host starting…, Reconnecting… | Studio is starting, or getting back, its connection to devices. |
| Host down | Studio lost its connection to devices. Press it to try again; hover it for the error. |
| Relaunch injected | The app runs, but without Squiggle attached, so each flow is slower and waits fall back to fixed sleeps. Press it to relaunch the app with Squiggle attached. |
| Not injected | The same, when Studio doesn’t know which app this is, so it can’t relaunch it: no app is connected, and your open project names no iOS app. Name it in apps.ios in .squiggle/config.jsonc, rebuild the app with the current SDK, which starts Squiggle itself, or run a flow, which relaunches it with Squiggle attached. |
Go to screen and the inspect-element button sit beside the chip only while it reads ● live. In any other state there is no app for them to act on, so they fold into the chip and come back when the app is live.
Go to a screen
Go to screen is named by the screen the app is on. Open it to see every screen the app declares or Studio has seen, grouped the way the app nests them, with a tick on the current one. The group that holds the current screen starts open; select a group’s name to open or close it. Type to search every group at once. Choose a screen and Studio walks the app there, tapping along the path it knows. On a simulator, Open link from clipboard and your recent deep links sit under the list.