Overview
The Synheart Core iOS/Swift SDK provides a unified API for collecting HSI-compatible data, processing human state on-device, and generating focus/emotion signals in native iOS applications. Key Features:- Native iOS support
- On-device HSI Runtime
- Combine framework integration
- Real-time state updates
- Privacy-first architecture
Installation
Swift Package Manager
Add to yourPackage.swift:
Xcode
- File > Add Packages…
- Enter repository URL:
https://github.com/synheart-ai/synheart-core-sdk-swift.git - Select version:
1.0.0or later - Add to your target
Configuration
Info.plist
Add required usage descriptions:Capabilities
Enable required capabilities in Xcode:- Select your target
- Go to “Signing & Capabilities”
- Add “HealthKit” (if using Wear module)
Basic Usage
Initialize the SDK
Subscribe to HSI Updates
Enable Interpretation Modules
Enable Cloud Sync
Complete Example
SwiftUI View
HSI State Reference
Focus Module
Emotion Module
Cloud Connector
Configuration Options
Error Handling
Privacy & Consent
Async/Await Support
Background Updates
API Reference
Synheart
Main SDK class.
Static Methods:
| Method | Description | Returns |
|---|---|---|
initialize() | Initialize the SDK | Void |
enableFocus() | Enable focus module | Void |
enableEmotion() | Enable emotion module | Void |
enableCloud() | Enable cloud sync | Void |
dispose() | Cleanup resources | Void |
| Publisher | Type | Description |
|---|---|---|
onHSIUpdate | AnyPublisher<HSIState, Never> | HSI state updates |
onFocusUpdate | AnyPublisher<FocusUpdate, Never> | Focus estimates |
onEmotionUpdate | AnyPublisher<EmotionState, Never> | Emotion states |
onCloudSync | AnyPublisher<SyncEvent, Never> | Cloud sync events |
Resources
- Repository: synheart-core-sdk-swift
- Documentation: API Reference
- Issues: GitHub Issues
Related Documentation
- HSV Specification - Understand Synheart Core’s internal state model
- Architecture - Deep dive into the system
- Capability System - Access levels and permissions
Author: Israel Goytom