Cartesiandocs

iOS SDK

Installation

Add the Cartesian iOS SDK with Swift Package Manager.

Requirements

Minimum
iOS16.0
Swift5.9 (Xcode 15)
DependenciesNone. Only Apple frameworks (Foundation, Combine, CryptoKit, Security, SwiftUI, Speech, Network).

CartesianCore also builds on macOS 13, so you can use it in tests and command-line tools.

Add the package

Package.swift
dependencies: [
    .package(url: "https://github.com/CogitX/cartesian-ios", from: "0.1.0"),
],
targets: [
    .target(name: "Shop", dependencies: [
        .product(name: "CartesianUI", package: "cartesian-ios"),
        // or headless only:
        // .product(name: "CartesianCore", package: "cartesian-ios"),
    ]),
]

Preview: Swift Package Manager needs Package.swift at the root of a repository. Releases will be mirrored from sdk/ios in the Cartesian repo to the public CogitX/cartesian-ios repository. Until the first release, add sdk/ios as a local package (File > Add Package Dependencies > Add Local…).

CartesianUI re-exports CartesianCore, so import CartesianUI is enough.

Info.plist keys

The composer's dictation button uses SFSpeechRecognizer. Add both keys:

KeyWhat the shopper sees
NSMicrophoneUsageDescriptionWhy the app records audio, for example "Dictate questions to the shopping assistant."
NSSpeechRecognitionUsageDescriptionWhy speech is sent for recognition, for example "Turns your speech into text for the assistant."

If either key is missing, the SDK doesn't request permission (which would crash the app). The mic button shows "Voice input isn't set up in this app." To remove the button, set CartesianFeatures(voice: false).

Fonts

The UI kit bundles Spline Sans (400/500/600) and IBM Plex Serif Italic, the same fonts as Android and the web. Cartesian.configure registers them for the process; you don't need to list them in UIAppFonts.