> ## Documentation Index
> Fetch the complete documentation index at: https://figranium.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Figranium Swift SDK: Browser Automation for Apple Platforms

> Official Swift SDK for the Figranium API. Async/await client for macOS, iOS, tvOS, watchOS, and server-side Swift with typed models and SSE streams.

The `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

> [card] 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`.

> [card] 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.

> [card] Custom URLSession
>
> Pass your own `URLSession` for custom delegate behavior, certificate pinning, or test doubles. The SDK never replaces a caller-supplied session.

> [card] 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

| Field | Value |
| :- | :- |
| Package | `Figranium` |
| Import | `Figranium` |
| Swift tools | `6.0` |
| Platforms | macOS 13, iOS 16, tvOS 16, watchOS 9 |
| Dependencies | None |
| License | Apache-2.0 |
| Repository | [figranium/figranium-swift](https://github.com/figranium/figranium-swift) |

## What you can do with the SDK

* Save, update, version, and roll back tasks with typed `Task` and `Action` values.
* Run tasks with runtime variables, or call `scrape`, `agent`, and `headful` directly for one-off executions.
* Stream live execution and selector events over Server-Sent Events.
* Manage schedules, captures, cookies, and Cabinets.
* Select a per-task Cabinet for intercepted downloads and build typed upload actions.
* Open and inspect headful browser sessions.

## Where to go next

> [card] [Installation](https://figranium.dev/docs/sdk/swift/installation.md)
>
> Add the package in Xcode or Swift Package Manager and confirm your environment can reach Figranium.

> [card] [Quickstart](https://figranium.dev/docs/sdk/swift/quickstart.md)
>
> Build, save, and run a typed task in a few minutes.

> [card] [Client configuration](https://figranium.dev/docs/sdk/swift/client-configuration.md)
>
> Configure `baseURL`, timeouts, custom `URLSession`, and default headers.

> [card] [Resources](https://figranium.dev/docs/sdk/swift/resources/tasks.md)
>
> Reference for every resource exposed on the `Figranium` client.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.