app_open_url
Opens a URL on a simulator device, triggering the system URL handling mechanism. This works with standard web URLs (which open in Safari), custom URL schemes (e.g., myapp://), and Universal Links (which open in the associated app). This is the primary tool for testing deep linking, push notification payloads that contain URLs, and app-to-app navigation flows.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
deviceId | string | Yes | — | The UDID of the target simulator device. |
url | string | Yes | — | The URL or deep link to open. Can be an https:// URL, a custom scheme URL, or a Universal Link. |
Usage Examples
Section titled “Usage Examples”Open a custom URL scheme deep link
Section titled “Open a custom URL scheme deep link”“Open the product detail page in the shopping app via its deep link.”
{ "deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789", "url": "shopapp://products/12345"}Open a Universal Link
Section titled “Open a Universal Link”“Test the Universal Link for a shared weather forecast.”
{ "deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789", "url": "https://www.example.com/weather/forecast/san-francisco"}Open a web URL in Safari
Section titled “Open a web URL in Safari”“Open our marketing landing page in the simulator’s Safari.”
{ "deviceId": "A1B2C3D4-E5F6-7890-ABCD-1234567890EF", "url": "https://www.example.com/promo/summer-sale"}Test a callback URL from OAuth
Section titled “Test a callback URL from OAuth”“Simulate the OAuth callback redirect.”
{ "deviceId": "F3A1B2C3-D4E5-6789-ABCD-EF0123456789", "url": "com.example.weatherapp://oauth/callback?code=abc123&state=xyz"}Example Output
Section titled “Example Output”URL opened successfully.Device: F3A1B2C3-D4E5-6789-ABCD-EF0123456789URL: shopapp://products/12345Related Tools
Section titled “Related Tools”app_launch— Launch the app first if it needs to be running to handle the URL.app_install— Install the app that should handle the URL scheme.screenshot— Capture a screenshot to verify the correct screen loaded after opening the URL.log_stream— Stream logs to verify the app received and processed the URL correctly.