Scriptable
Scriptable is an automation app for iOS that lets you write JavaScript scripts to interact with native iOS APIs. Protocol Launcher allows you to generate deep links to open Scriptable, create new scripts, or run existing scripts.
Usage
There are two ways to use this library:
- On-Demand import from subpaths enables tree-shaking and keeps bundles small.
- Full Import from the root package is convenient but includes all app modules.
Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.
Select Installation Method
On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.
Open App
ts
import { open } from 'protocol-launcher/scriptable'
const url = open()Add Script
ts
import { addScript } from 'protocol-launcher/scriptable'
const url = addScript()Open Script
ts
import { openScript } from 'protocol-launcher/scriptable'
const url = openScript({
scriptName: 'Example',
})Open Script with Settings
ts
import { openScript } from 'protocol-launcher/scriptable'
const url = openScript({
scriptName: 'Example',
openSettings: true,
})Run Script
ts
import { runScript } from 'protocol-launcher/scriptable'
const url = runScript({
scriptName: 'Example',
})Run Script with Editor
ts
import { runScript } from 'protocol-launcher/scriptable'
const url = runScript({
scriptName: 'Example',
openEditor: true,
})