Ship Onde with Swift Package Manager.

Start with onde-swift. When you need to work on the SDK itself, the package can switch to a local OndeFramework.xcframeworkautomatically. When you want to see the package in a real app, look at Klepon.

SwiftPM package

`Package.swift` prefers a local `OndeFramework.xcframework` when it exists, then falls back to the published binary target from the matching `onde` release when it does not.

Apple coverage

The package currently declares iOS 16, macOS 14, tvOS 16, visionOS 1, and watchOS 9. Same `import Onde`, same package, across the Apple platforms the repo actually supports.

Local builds

`make ios`, `make macos`, `make tvos`, `make visionos`, and `make watchos` all live in `onde-swift`. The Makefile builds the sibling `../onde` checkout, regenerates `Sources/Onde/onde.swift`, and refreshes `OndeFramework.xcframework`.

Shipped app

Klepon pins `https://github.com/ondeinference/onde-swift` at `1.1.0` and uses it in a multi-platform SwiftUI app that ships iPhone, Mac, Apple TV, Vision Pro, and Apple Watch targets from one repo.

Quick start

Install the published package.

Add the package in Xcode or `Package.swift`. When there is no local framework in the repo, Swift Package Manager downloads the published XCFramework from the release URL baked into `onde-swift/Package.swift`. If you want to validate model downloads or GGUF export before you wire up the app UI, use Onde CLI. If you want the bigger picture first, read What Onde Is.

dependencies: [
  .package(url: "https://github.com/ondeinference/onde-swift", from: "1.1.0")
],
targets: [
  .target(
    name: "YourTarget",
    dependencies: [.product(name: "Onde", package: "onde-swift")]
  )
]

Local workflow

Stay in `onde-swift` when you need local builds.

Keep `onde` and `onde-swift` next to each other, run one command from the Swift repo, then open the generated example app. The loop is short, which is exactly what you want when you are changing the package surface or checking fresh UniFFI glue.

Repositories/
├── onde/
└── onde-swift/
Build the local packagemake ios
Generate and open the example appcd Examples/OndeExample && xcodegen generate && open OndeExample.xcodeproj

`make ios` builds the Rust core from `../onde`, regenerates `Sources/Onde/onde.swift`, and writes `OndeFramework.xcframework` into the `onde-swift` package root. The same Makefile also exposes `make macos`, `make tvos`, `make visionos`, and `make watchos`.

One detail worth knowing: `make tvos`, `make visionos`, and `make watchos` use the nightly Rust toolchain in the current Makefile because those targets build with `-Z build-std`.

Example app

The sample stays small on purpose.

`Examples/OndeExample` is an iOS SwiftUI chat app. Its `project.yml` points the package dependency at `../..`, so it exercises the local package root you just built. There is no checked-in `.xcodeproj`. You generate it with XcodeGen when you need it.

Token-by-token streaming with a stop button
Conversation persistence between launches
System prompt and sampling preset controls
Reload and clear actions in the toolbar
Prompt suggestions when the conversation is empty

It is the right place to test the core loop: load, stream, stop, persist, clear. The app already calls the sandbox cache setup helper before it touches `OndeChatEngine`, so you are testing a setup that matches real iPhone constraints.

Showcase

Klepon shows what a shipped integration looks like.

Klepon is a SwiftUI guide to Indonesian dishes, ingredients, and food traditions. It uses Onde for private on-device follow-up answers. That makes it a much better showcase than a synthetic demo, because the repo has to deal with real schemes, entitlements, package pinning, and App Store packaging.

Exact package pin

`onde-klepon/project.yml` pulls `Onde` from `https://github.com/ondeinference/onde-swift` at `exactVersion: 1.1.0`.

Five Apple schemes

The repo builds `Klepon`, `Klepon Mac`, `Klepon TV`, `Klepon Vision`, and `Klepon Watch`, so the same package gets exercised across the full app surface.

Shared model storage

The app uses `group.com.ondeinference.apps` and the increased memory entitlement on iPhone, which is the kind of setup real Apple apps need when they share downloaded models.

App Store packaging

The iPhone target injects `PrivacyInfo.xcprivacy` into each `OndeFramework.xcframework` slice before shipping so nested framework scanning stays clean.

Coverage

Package platform support.

These minimums come straight from `onde-swift/Package.swift`. They tell you the floor for the published package. Klepon then chooses its own higher deployment targets on top: iOS 18.5, macOS 15, tvOS 18.5, visionOS 1.0, and watchOS 9.0.

PlatformMinimumStatus
iOS16.0Ready
macOS14.0Ready
tvOS16.0Ready
visionOS1.0Ready
watchOS9.0Ready