Figranium Swift package is the official Swift client for the Figranium API. It is built on Swift concurrency (async/await), ships with typed models for tasks, actions, and executions, and exposes execution and selector streams as AsyncThrowingStream. The SDK runs on macOS, iOS, tvOS, watchOS, and server-side Swift with zero external dependencies.
Highlights
Native Swift concurrency
Every method is
async throws. Execution and selector streams surface as AsyncThrowingStream<StreamEvent<JSONValue>, Error> that you iterate with for try await.Zero dependencies
The package depends only on Foundation. No third-party HTTP or JSON libraries are required, so it stays lightweight in your dependency tree.
Custom URLSession
Pass your own
URLSession for custom delegate behavior, certificate pinning, or test doubles. The SDK never replaces a caller-supplied session.Abortable streams
Cancelling the consuming
Task cancels the underlying stream. executions.watch(_:interval:) polls and yields only on status change, finishing when the run ends.Package facts
What you can do with the SDK
- Save, update, version, and roll back tasks with typed
TaskandActionvalues. - Run tasks with runtime variables, or call
scrape,agent, andheadfuldirectly for one-off executions. - Stream live execution and selector events over Server-Sent Events.
- Manage schedules, captures, cookies, output credentials, and Cabinets.
- Select a per-task Cabinet for intercepted downloads and build typed upload actions.
- Open and inspect headful browser sessions.
- Administer settings (API keys, AI providers, proxies, theme) with a browser session.
Where to go next
Installation
Add the package in Xcode or Swift Package Manager and confirm your environment can reach Figranium.
Quickstart
Build, save, and run a typed task in a few minutes.
Client configuration
Configure
baseURL, timeouts, custom URLSession, and default headers.Resources
Reference for every resource exposed on the
Figranium client.