JavaScript Documentation / app

This object contains methods for interacting with the app.

app.openURL(url)

Opens a URL, returns true if the URL was successfully opened; otherwise false.

Parameters

Example

app.openURL('https://apple.com'); //open apple.com in Safari

app.inDarkMode()

Returns a boolean indicating whether the app is in dark mode.

app.toggleDarkMode()

Toggles dark mode.

app.getClipboard()

Returns the Clipboard contents.

app.setClipboard(text)

Replaces the contents of the Clipboard with text.

Parameters