Find the function.
Understand the result.
198 entries, grouped by task. Every page has a signature, arguments, return value and a short example. Use the search in the navigation to find a function or alias.
Examples with com.example.app or sample element identifiers must be adapted after inspecting your app. Start with selectors and waits for UI automation. Markdown index ↗
Apps
- openApp2 aliases
Bring an installed app to the foreground.
- waitForApp
Launch an app if necessary and wait for its helper.
- appKill
Request termination of an app.
- appInfo
Read installed-app metadata.
- getAppState
Read an app’s process state.
- appStateInfo
Read installation, process and foreground state separately.
- frontMostAppId
Identify the foreground app.
- frontMostAppOrientation1 aliases
Read interface orientation.
- openURL
Ask iOS to open a URL or supported URL scheme.
Touches and keyboard
- tap
Touch and release a screen position.
- touchDown
Begin a finger contact without releasing it.
- touchMove
Move an existing finger contact.
- touchUp
Release a finger contact.
- swipe
Simulate a finger-1 swipe between two positions.
- keyDown
Press a hardware button.
- keyUp
Release a hardware button.
- KEY_TYPE
Named hardware button values.
- typeText
Type into the foreground app.
- deleteText
Send backspaces to the focused input.
- hideKeyboard
Ask the foreground app to dismiss its keyboard.
- copyText
Replace the clipboard text.
- readClipboard
Read clipboard text.
- setTouchPressure
Store a touch-pressure preference.
Timing and runtime
Device and feedback
- getScreenInfo
Read panel dimensions.
- getDeviceInfo
Read a structured device summary.
- getBatteryInfo
Read battery status.
- getTemperature
Read device temperature.
- getVersion
Read the installed ApplesauceOS version.
- getSN
Read the device serial number.
- getLocalIP
Read the local Wi-Fi IP address.
- kernelVersion
Read the kernel version.
- setBrightness1 aliases
Change screen brightness.
- setKeepAwake
Change the persisted keep-screen-awake preference.
- getKeepAwake
Read the keep-screen-awake preference.
- setAvoidSafeMode
Change the persisted safe-mode-avoidance preference.
- getAvoidSafeMode
Read the safe-mode-avoidance preference.
- vibrate
Request a vibration.
- say
Speak a string.
- playSound
Play a system sound.
- playSystemAlarm
Play system sound 1304.
- showNotice
Show a compact notification banner.
- alert
Show a device alert.
- log3 aliases
Append messages to the script log.
- clearLog
Clear the shared script log.
Shell and system
- execResult
Run a shell command and inspect its outcome.
- exec
Run a shell command and return combined output.
- execAsRoot
Run a command as root.
- isVpnActive
Check whether a VPN appears active.
- enableVPN
Request activation of the existing VPN configuration.
- disableVPN
Request VPN disconnection.
Files and encoding
- scriptsDir
Locate the installed Scripts directory.
- jbrootForPath
Resolve a path for the current jailbreak layout.
- readFile
Read a UTF-8 text file.
- writeFile
Write UTF-8 text to a file.
- fileExists
Check whether a path exists.
- listDir
List names in a directory.
- copyFile
Copy a file.
- moveFile
Move or rename a path.
- deleteFile
Remove a file or directory.
- makeDir
Create a directory.
- sha256
Convert text to SHA-256 hexadecimal digest.
- sha256Base64
Convert text to SHA-256 digest encoded as Base64.
- md5
Convert text to MD5 hexadecimal digest.
- base64Encode
Convert text to Base64-encoded UTF-8 text.
- base64Decode
Convert text to Decoded UTF-8 text.
Screen and vision
- screenshot
Save the screen as a PNG file.
- getColor
Sample one screen pixel.
- getColors
Sample several pixels from a single capture.
- rgbToInt
Pack RGB channels into an integer.
- intToRgb
Unpack an RGB integer.
- ocr
Read text from the screen or an image.
- recognizeTextSupportedLanguages
Discover OCR languages on this device.
- searchColor
Find pixels matching a color.
- findColors
Find a pattern of color anchors.
- findImage
Find a template image on the screen.
UIHelper queries
- UIHelper.forApp
Create a query client pinned to one app.
- UIHelper.findElement1 aliases
Find the first matching element.
- UIHelper.findElements1 aliases
Find all matching elements.
- UIHelper.waitForElement1 aliases
Wait for a matching element.
- UIHelper.exists
Check presence without polling.
- UIHelper.waitForGone1 aliases
Wait until no element matches.
- UIHelper.waitForAny1 aliases
Wait for any of several possible screen states.
- UIHelper.waitForAll1 aliases
Wait until every selector has a match.
- UIHelper.waitFor
Wait for a custom read-only condition.
- UIHelper.tap
Wait for a visible, enabled element and tap once.
- UIHelper.findElementsInRect
Find elements whose snapshot centers lie in a rectangle.
- UIHelper.getTree
Inspect the nested UI/accessibility hierarchy.
- UIHelper.observe
Inspect elements with short references and selector suggestions.
Element actions
- Element.tap1 aliases
Activate an element once.
- Element.setText1 aliases
Replace the value of a supported UIKit text field/view.
- Element.typeText1 aliases
Focus an element and insert text.
- Element.clear1 aliases
Clear a supported UIKit text field/view.
- Element.scroll
Scroll the nearest scroll view by 75% of its viewport.
- Element.scrollIntoView
Reveal an existing element in its nearest scroll view.
- Element.getAttributes
Read fresh element attributes.
- Element.getText
Read fresh element text.
- Element.getValue
Read the fresh element value.
- Element.getRect
Read fresh element bounds.
- Element.isDisplayed
Check current visibility.
- Element.isEnabled
Check whether interaction is enabled.
- Element.getAttribute
Read one named fresh attribute.
- Element.exists
Check whether this reference is still valid, or query its descendants.
- Element.snapshot
Read the snapshot captured by the last query.
- Element.findElement
Find the first matching element. Scoped to descendants.
- Element.findElements
Find all matching elements. Scoped to descendants.
- Element.waitForElement
Wait for a matching element. Scoped to descendants.
- Element.waitForGone
Wait until no element matches. Scoped to descendants.
- Element.waitForAny
Wait for any of several possible screen states. Scoped to descendants.
- Element.waitForAll
Wait until every selector has a match. Scoped to descendants.
- Element.waitFor
Wait for a custom read-only condition. Scoped to descendants.
- Element.findElementsInRect
Find elements whose snapshot centers lie in a rectangle. Scoped to descendants.
- Element.getTree
Inspect the nested UI/accessibility hierarchy. Scoped to descendants.
- Element.toJSON
Serialize this native element reference.
- Element.id
Read the cached native object reference.
Modules and async
- require
Load a CommonJS module or JSON file.
- require.resolve
Resolve a module without executing it.
- module.exports
Define the value returned by require().
- exports
Add properties to the module’s initial exports object.
- __dirname
Locate the current module’s folder.
- __filename
Locate the current module file.
- args
Read arguments supplied when starting a script.
- require.cache
Inspect loaded CommonJS modules for this run.
- require.main
Identify the entry module.
- module.require
Load a module relative to this module.
- setTimeout
Schedule a callback once.
- setInterval
Schedule a callback repeatedly.
- setImmediate
Schedule a callback after current synchronous work.
- clearTimeout
Cancel a scheduled callback.
- clearInterval
Cancel a scheduled callback.
- clearImmediate
Cancel a scheduled callback.
- globalThis1 aliases
Access the script global object.
- at
Access the automation API namespace.
- module
Inspect the current CommonJS module.
HTTP requests
- fetch
Make an asynchronous text/JSON HTTP request.
- Response.text
Consume an HTTP response body.
- Response.json
Consume an HTTP response body.
- Headers.get
Read response headers.
- Headers.has
Read response headers.
- Headers.entries
Read response headers.
- Headers.forEach
Read response headers.
- request
Use the built-in callback-style HTTP adapter.
- request.get
Send an HTTP GET request.
- request.post
Send an HTTP POST request.
- request.put
Send an HTTP PUT request.
- request.patch
Send an HTTP PATCH request.
- request.delete
Send an HTTP DELETE request.
- request.head
Send an HTTP HEAD request.
- request.defaults
Create a callable adapter with default options.
- RequestHandle.abort
Cancel a pending callback-style request.
- httpRequest
Make a synchronous text HTTP request.
- httpGet
Make a synchronous GET request.
- Response.properties
Read HTTP response state.
Objective-C
- RemoteObjC.forApp1 aliases
Create or reuse a native client for a running app.
- ObjC.class
Get a class loaded in SpringBoard and call its native methods directly.
- ObjC.hasClass
Check whether a class is loaded.
- ObjC.call
Call an exact Objective-C selector.
- ObjC.create
Allocate and initialize a native object.
- ObjC.getInfo
Inspect the target process/session.
- ObjC.out1 aliases
Prepare an object output parameter, such as NSError**.
- ObjC.setTimeout
Set the total remote-call wait.
- ObjC.close
Release a native session and invalidate its references.
- ObjC.reconnect
Open a fresh session after a restart or close.
- RemoteObjC.closeAll
Close remote native clients created by this script.
- ObjCObject.call
Invoke an exact selector on a proxy.
- ObjCObject.get
Read a value through native key-value coding.
- ObjCObject.set
Set a value through native key-value coding.
- ObjCObject.toJS
Copy Foundation values into JavaScript.
- ObjCObject.respondsTo
Check selector support.
- ObjCObject.signature
Read native method type information.
- ObjCObject.release
Release this retained proxy.
- ObjCObject.metadata
Read cached native reference metadata.
- classExists
Inspect a local Objective-C class.
- classHasSelector
Inspect a local Objective-C class.
- ObjC.C
Use the C client that shares this Objective-C session.
- ObjCObject.toJSON
Copy a supported Foundation value when JSON.stringify serializes a proxy.
- ObjCObject.toString
Read the native object’s description as a JavaScript string.
- ObjCOut.value
Read an object output parameter after a native call.
Native C functions
- RemoteC.forApp1 aliases
Create or reuse a C client for a running app.
- C.bind
Resolve a native function and cache its prepared signature.
- C.bindAddress
Bind a function at its current runtime address.
- C.call
Bind through the cache and invoke immediately.
- C.alloc
Allocate a zero-filled managed buffer.
- C.getInfo
Inspect the target process/session.
- C.setTimeout
Set the total remote-call wait.
- C.close
Release a native session and invalidate its references.
- C.reconnect
Open a fresh session after a restart or close.
- RemoteC.closeAll
Close the script’s remote native sessions.
- CFunction.invoke
Invoke a function returned by bind or bindAddress.
- CFunction.release
Release a prepared native function handle.
- CPointer.byteLength
Read known managed buffer bounds.
- CPointer.readBytes
Copy a bounded managed-buffer range into JS.
- CPointer.writeBytes
Write bytes into managed storage.
- CPointer.release
Release a pointer handle.