simulator_set_content_size
Set the Dynamic Type preferred content size category system-wide. Apps that useUIFontTextStyle or SwiftUI’s .font() modifiers update immediately.
Parameters
The content size category to apply. All 12 categories in order from smallest to largest:
| Value | Description |
|---|---|
extra-small | Smallest standard size |
small | Small standard size |
medium | Medium standard size |
large | Default system size |
extra-large | Larger than default |
extra-extra-large | Even larger |
extra-extra-extra-large | Largest standard size |
accessibility-medium | First accessibility size |
accessibility-large | Second accessibility size |
accessibility-extra-large | Third accessibility size |
accessibility-extra-extra-large | Fourth accessibility size |
accessibility-extra-extra-extra-large | Largest accessibility size |
Target device UDID or name. Defaults to the booted simulator.
Example
simulator_set_increase_contrast
Enable or disable the Increase Contrast accessibility setting. When enabled, the system reduces transparency and increases color contrast throughout the UI.Parameters
true to enable Increase Contrast, false to disable it.Target device UDID or name. Defaults to the booted simulator.
Example
simulator_location_scenario
Run one of Apple’s built-in GPS simulation scenarios. These animate realistic movement patterns — driving on a freeway, running through a city, or cycling — so you can test your app’s response to continuous location updates.Parameters
Lifecycle command. One of:
"list"— show all available scenario names"run"— start a named scenario"clear"— stop the current scenario and clear location
Name of the scenario to run. Required when
action is "run". Built-in scenarios include:"Freeway Drive""City Run""City Bicycle Ride""Apple"
action="list" to see the full set available on your Xcode version.Target device UDID or name. Defaults to the booted simulator.
Example
simulator_location_route
Simulate movement along a custom path by providing GPS waypoints and an optional speed. The simulator interpolates between the points, producing a smooth stream of location updates.Parameters
Array of coordinate objects. Each object requires:
lat— latitude as a numberlng— longitude as a number
Speed in meters per second. Omit to use the default walking speed.
Target device UDID or name. Defaults to the booted simulator.
Example
Use
simulator_location_scenario action="clear" to stop the route simulation.simulator_memory_warning
Trigger a simulated memory warning, causing iOS to dispatchUIApplication.didReceiveMemoryWarningNotification and call didReceiveMemoryWarning() on all view controllers. Use this to verify your app frees caches and non-essential resources correctly.
Parameters
Target device UDID or name. Defaults to the booted simulator.
Example
simulator_keychain
Manage the device keychain: install trusted root certificates for HTTPS interception, add intermediate certificates, or wipe the entire keychain to restore a clean state.Parameters
The keychain operation to perform. One of:
"add-root-cert"— install a root CA as trusted"add-cert"— install an intermediate or leaf certificate"reset"— clear the entire keychain
Absolute path to the certificate file (
.cer, .pem, or .der). Required for add-root-cert and add-cert.Target device UDID or name. Defaults to the booted simulator.
Example
simulator_icloud_sync
Trigger iCloud synchronisation on the device. The simulator must be signed into an Apple ID for this to have any effect.Parameters
Target device UDID or name. Defaults to the booted simulator.
Example
simulator_verbose_logging
Enable or disable verbose device logging. When enabled, iOS emits significantly more diagnostic output, which is useful for deep kernel and framework-level debugging.Parameters
true to enable verbose logging, false to disable it.Target device UDID or name. Defaults to the booted simulator.
Example
simulator_install_app_data
Install an.xcappdata package to replace the app’s current data container. This restores a saved snapshot — useful for initialising a known state before a test run.
Parameters
Absolute path to the
.xcappdata package on the host Mac.Target device UDID or name. Defaults to the booted simulator.
Example
simulator_get_env
Read an environment variable from the running simulator. The simulator inherits a set of system variables —HOME, TMPDIR, PATH — that can be useful for constructing paths to simulator internals.
Parameters
The environment variable name to read. For example,
"HOME", "TMPDIR", or "PATH".Target device UDID or name. Defaults to the booted simulator.
Example
simulator_biometric
Set the Face ID or Touch ID enrollment state. Toggle this to test authentication flows that branch on whether biometrics are enrolled.Parameters
true to mark biometrics as enrolled, false to mark them as not enrolled.Target device UDID or name. Defaults to the booted simulator.
simulator_network_status
Return the simulator’s network configuration: host hardware ports, DNS resolution status, and the simulator’s data path. The simulator shares the host Mac’s network interfaces.Parameters
Target device UDID or name. Defaults to the booted simulator.
Example output
simulator_defaults_read
Read UserDefaults values from inside the simulator. This executesdefaults read in the simulator’s environment, giving you access to app preferences, system settings, and feature flags stored in NSUserDefaults.
Parameters
The defaults domain to read from. This is typically a bundle identifier such as
"com.example.MyApp", or "NSGlobalDomain" for system-wide settings.A specific key to read. Omit to return all key-value pairs in the domain.
Target device UDID or name. Defaults to the booted simulator.
Example
simulator_defaults_write
Write a UserDefaults value inside the simulator. Use this to inject feature flags, override configuration, or set test-specific app state without modifying the app’s code.Parameters
The defaults domain (bundle ID) to write into.
The key to write.
The value to set. Always provided as a string; use the
type parameter to cast it.The value type. One of
"string" (default), "int", "float", or "bool".Target device UDID or name. Defaults to the booted simulator.
Example
UserDefaults Feature Flag Workflow
Inject feature flags before a test run to exercise specific code paths without changing the app binary.Relaunch the app to pick up the new value
UserDefaults are typically read at startup. Terminate and relaunch to ensure the new value takes effect:
Biometric Auth Testing Workflow
Test the full biometric authentication flow by controlling enrollment state and observing how your app responds.Launch the app and trigger authentication
Navigate to the part of your app that requires biometric authentication. Take a snapshot to confirm the prompt is shown:
Test the unenrolled fallback path
Remove enrollment to verify your app handles the case where biometrics are unavailable:Confirm the app shows the password or PIN fallback.
