simulator_set_location
Set a simulated GPS location on the simulator. The change takes effect immediately for any app that readsCLLocationManager.
Parameters
Latitude in decimal degrees. Valid range:
-90 to 90.Longitude in decimal degrees. Valid range:
-180 to 180.Target device UDID or name. Defaults to the booted simulator.
Example
simulator_send_push
Deliver a push notification to an installed app using the full APNs payload format. The notification appears immediately without requiring an APNs connection or a real device.Parameters
The bundle identifier of the app to receive the push notification.
The complete APNs JSON payload. Must include an
aps key at minimum.Target device UDID or name. Defaults to the booted simulator.
APNs payload example
Silent push example
Usage
The app must have already requested notification permissions. Use
simulator_grant_permission with service="all" action="grant" to pre-grant all permissions including notifications.simulator_set_clipboard
Write text directly to the simulator’s clipboard. Use this to pre-populate paste content for testing paste flows, or to speed up filling in long strings like tokens and URLs.Parameters
The text to place on the simulator clipboard.
Target device UDID or name. Defaults to the booted simulator.
Example
simulator_add_media
Add one or more photos or videos to the simulator’s camera roll. Files are copied from the host Mac filesystem into the simulator’s Photos library.Parameters
Array of absolute paths to image or video files on the host Mac. Supported formats include JPEG, PNG, HEIC, MP4, and MOV.
Target device UDID or name. Defaults to the booted simulator.
Example
simulator_grant_permission
Grant, revoke, or reset a privacy permission for any installed app. This avoids clicking through the system permission dialog during automated testing.Parameters
The bundle identifier of the target app.
The permission service to modify. Available values:
| Service | Description |
|---|---|
all | All permissions at once |
calendar | Calendar access |
contacts-limited | Limited contacts access |
contacts | Full contacts access |
location | Location while in use |
location-always | Location always (background) |
photos-add | Add photos only |
photos | Full photo library access |
media-library | Apple Music / media library |
microphone | Microphone |
motion | Motion & Fitness |
reminders | Reminders |
siri | Siri & Dictation |
What to do with the permission. One of:
"grant"— allow the permission"revoke"— deny the permission"reset"— return the permission to its unasked state (dialog will appear again)
Target device UDID or name. Defaults to the booted simulator.
