TypeScript SDK
Device lifecycle
Launch dedicated simulators or connect to existing devices.
Launch a dedicated simulator
const device = await ios.launch();
try {
await device.apps.open("Settings");
} finally {
await device.close();
}ios.launch() creates and boots a dedicated simulator. Closing the device shuts down and deletes that simulator.
Connect to a booted simulator
const device = await ios.connect();A connected simulator is not deleted when the handle closes.
Explicit resource management
await using device = await ios.connect();
await device.apps.open("Settings");
console.log((await device.observe()).rendered);