Device + app state
list_devices
Section titled “list_devices”List available simulators and paired physical devices.
list_devices()# → [{ udid, name, os_version, target, status }, ...]app_state
Section titled “app_state”Inspect the running app: foreground/background, current view controller, process state.
app_state(bundle_id="com.acme.app")List installed apps on the current target.
apps()pre_grant_permissions
Section titled “pre_grant_permissions”Pre-grant TCC permissions (Camera, Microphone, Location, Photos, Contacts, Calendar, Reminders) to skip first-launch alerts.
pre_grant_permissions( bundle_id="com.acme.app", permissions=["camera", "microphone", "location_always"])set_appearance
Section titled “set_appearance”Switch the simulator between light and dark mode.
set_appearance(mode="dark")