Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kontext.so/llms.txt

Use this file to discover all available pages before exploring further.

The Example directory in the SDK repo ships a working UIKit demo you can run end-to-end against your own publisher token.

Clone and configure

git clone https://github.com/kontextso/sdk-swift.git
cd sdk-swift
cp ExampleSecrets.swift.example ExampleSecrets.swift
# Edit ExampleSecrets.swift and set `publisherToken` to your real token.
open Example/Example.xcodeproj
Then run the Example scheme on a simulator or device.
ExampleSecrets.swift lives at the repo root (not inside Example/) and is gitignored, so your token won’t be committed. The Xcode project references it at ../../ExampleSecrets.swift; if the file is missing the build fails clearly — copy the .example template before opening Xcode.
The default publisherToken placeholder (YOUR_PUBLISHER_TOKEN) won’t return real ads — replace it with your token from the publisher dashboard.

What you should see

After launch, the demo presents a chat interface with seeded user + assistant messages. As you send a message, the SDK fires /preload in the background and renders an ad below the assistant’s reply.