Swift SDK (iOS and macOS)
The ORYKSA AI employee inside an iOS or macOS app: SwiftUI and UIKit, the same chat as the website, in four languages, with no dependencies.
What the SDK does and what it is for
It puts the ORYKSA chat bubble and voice inside your app, to serve the customers of your business: they ask, buy and book. The AI answers with your Brain, your products and your services, with the name, photo and voice you chose in Your AI, and saves leads, bookings and sales in the Activities of your ORYKSA account, like WhatsApp or the website chat.
It is not an interface for the owner: through the SDK nobody changes your settings, reads your Activities or gives orders to ORYKSA, even if they say they are the owner. The chat where the owner talks to ORYKSA exists only in the official ORYKSA app, the dashboard and the browser extension.
Voice since version 1.1 (Android, iOS, Flutter and React Native), with the same behaviour as the ORYKSA app. The JavaScript and .NET SDKs are text only.
Swear words the customer types show as asterisks in the chat (the same list as every ORYKSA chat, from GET https://app.oryksa.com/widget/profanity.json); the AI's replies already come filtered.
| Package | Version | Platforms | Licence |
|---|---|---|---|
Oryksa (GitHub) | 1.1.1 | iOS 15+, macOS 12+ | MIT |
Install
In Xcode: File > Add Package Dependencies, paste the repository URL and pick 1.1.1. Or add it to your Package.swift; CocoaPods users add the pod from the public registry.
// Package.swift .package(url: "https://github.com/oryksa/oryksa-swift", from: "1.1.1") # CocoaPods (https://cocoapods.org/pods/Oryksa) pod 'Oryksa', '~> 1.1'
Minimal example
One floating button that opens the chat. The button shows "Talk to <name>" with the AI employee's photo, exactly like the website chat.
import Oryksa
// The app never holds the API key: your backend creates short-lived
// session tokens (oryk_cs_...) with POST /v1/sessions and hands them over.
let client = OryksaClient(getToken: { try await MyBackend.fetchOryksaToken() })
struct ContentView: View {
var body: some View {
MyScreen()
.overlay(alignment: .bottomTrailing) {
OryksaChatButton(client: client, lang: "en") // en, pt, br, es
}
}
}
Pieces
| Piece | What it does |
|---|---|
OryksaChatButton(client:, lang:) | Floating button with the photo and name; opens the chat. |
OryksaChatView(client:) | The chat panel in SwiftUI, wherever you want it. |
OryksaChatViewController(client:) | The same panel for UIKit apps. |
OryksaChatTheme | Colours. |
client.agent(), client.sendAndWait(_:), client.messages() | No interface: agent details, send a message and wait for the reply, message history. |
What the user sees
- The same look as the website chat: button with the photo, header with the name and "online", bubbles, suggestions, SEND and "Powered by ORYKSA".
- Languages:
en,pt(Portugal),br(Brazil),es. The name and photo come from the owner's "Your AI" profile. - Voice (since 1.1): the microphone in the chat opens the voice screen, with the same behaviour as the ORYKSA app. Each reply has a copy button.
getToken to fetch a short-lived oryk_cs_... token from your backend; the SDK refreshes it when it expires. Create the tokens with the Sessions API from any server language.
