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 iosGenerate 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 buttonConversation persistence between launchesSystem prompt and sampling preset controlsReload and clear actions in the toolbarPrompt 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 schemesThe 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 storageThe 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 packagingThe iPhone target injects `PrivacyInfo.xcprivacy` into each `OndeFramework.xcframework` slice before shipping so nested framework scanning stays clean.
Coverage
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