Open URL
Open a specified URL in the iOS device's Safari browser.
Interface Description
Interface Type
execShortcutParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deviceId | string | ✅ | Device ID |
directive | string | ✅ | Fixed value 'openUrl' |
payload | string | ✅ | URL address to open |
Return Value
javascript
true // Returns true on successful openingBasic Usage
javascript
// Open webpage
await apiInvoke('execShortcut', {
deviceId: 'P72578581E07',
directive: 'openUrl',
payload: 'https://www.baidu.com'
});Notes
Tips
- Opening an unauthorized URL will trigger a permission request, which developers need to handle themselves