Quick Start
Get started with the SmartSpectra Swift SDK for iOS — iOS 17+.
This repo contains two build guides that produce similar user end states:
The only difference in builds is that the API key build gets up and running very fast, but hard-codes your API key. The OAuth build is more suitable for production deployments because it avoids hard-coding your API key.
Scope
These quickstarts intentionally request only:
SmartSpectraConfig.breathingMetricsSmartSpectraConfig.cardioMetricsMetricType.expressions
Please see the detailed documents for additional features.
Important Implementation Rules
Start by creating a new iOS app project named Cool Vitals.
The Quick Start is intended so that the developer can replace Cool Vitals/ContentView.swift as a full file.
- Import
SwiftUI,SmartSpectra, andAVFoundation. - Use
let sdk = SmartSpectraSDK.shared. - Buffer pulse, breathing, arterial pressure, chest, and abdomen samples locally before drawing charts.
Logging
SDK log verbosity defaults to warnings and errors only. To change it, set
logLevel on the SDK config:
SmartSpectraSDK.shared.config.logLevel = .infoLevels are cumulative — .debug, .info, .warning (default), .error,
.none. .debug cannot restore debug-only statements compiled out of the
release engine binary.
Choose Your Guide
Use Option 1: API Key for the fastest manual setup.
Use Option 2: OAuth if you need OAuth.
Either way, an AI assistant connected to the SmartSpectra MCP Server can do the account side for you — fetch your API key, or register your bundle ID and Apple team ID and download PresageService-Info.plist.
LLM Insights
See LLM Insights for natural-language analysis of the measured vitals.