iOS SDK
iOS SDK
A SwiftUI shopping assistant for iOS 16+, with the same API and behaviour as the Android SDK.
The iOS SDK is a preview (0.1.0). The API mirrors Android, but names can still change before the first public release.
The iOS SDK has the same two layers as Android:
| Android | iOS |
|---|---|
cartesian-core | CartesianCore: Swift, async/await, ObservableObject, no UI |
cartesian-ui | CartesianUI: SwiftUI, plus a UIKit present(from:) entry |
Cartesian.initialize(context, config) | Cartesian.configure(config, options:) |
CartesianPanelHost / rememberCartesianPanelState() | .cartesianPanel(state) / CartesianPanelState() |
CartesianChat | CartesianChatView |
CartesianListener | CartesianDelegate |
CartesianException | CartesianError |
PreferencesSessionStore | KeychainSessionStore (default) |
Both SDKs replay the same recorded backend sessions (spec/fixtures) through their reducers, so a turn renders the same way on both platforms.
Cartesian.configure(CartesianConfig(vertical: .grocery, baseURL: URL(string: "https://cartesian.yourcompany.com")!))
try await Cartesian.client.signIn(sessionToken: token)
ContentView()
.cartesianPanel(isPresented: $showAssistant)swiftInstallation
Add the Swift package and the Info.plist keys.
Quickstart
Configure, sign in and open the assistant.
Open the assistant
Sheet, side panel, Ask button, Ask bar and UIKit.
Customize
Theme, fonts, features, strings and slots.
Headless
Use CartesianCore to build your own UI.
Reference
Every public type at a glance.