Cartesiandocs

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:

AndroidiOS
cartesian-coreCartesianCore: Swift, async/await, ObservableObject, no UI
cartesian-uiCartesianUI: SwiftUI, plus a UIKit present(from:) entry
Cartesian.initialize(context, config)Cartesian.configure(config, options:)
CartesianPanelHost / rememberCartesianPanelState().cartesianPanel(state) / CartesianPanelState()
CartesianChatCartesianChatView
CartesianListenerCartesianDelegate
CartesianExceptionCartesianError
PreferencesSessionStoreKeychainSessionStore (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)
swift