Introduction
The Open Wearables iOS SDK (OpenWearablesHealthSDK) is a native Swift SDK for secure background synchronization of health data from Apple HealthKit to the Open Wearables platform.
This is the core native implementation that powers health data sync on iOS. The Flutter SDK uses this SDK under the hood as a wrapper.
GitHub Repository
View source code, report issues, and contribute to the iOS SDK.
Features
- Background Sync - Health data syncs even when your app is in the background via HealthKit observer queries and
BGTaskScheduler - Streaming Sync - Memory-efficient streaming processing for large datasets
- Resumable Sessions - Sync sessions survive app restarts and device reboots
- Dual Authentication - Token-based auth with auto-refresh or API key authentication
- Secure Storage - Credentials stored in iOS Keychain with
kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly - Automatic Retry - Persistent outbox with retry logic for failed uploads
- Per-User Isolation - State isolation between different user sessions
- Network Monitoring - Connectivity-aware sync with automatic resume
- Wide Data Support - Steps, heart rate, workouts, sleep, and 40+ data types
Requirements
Installation
- Swift Package Manager
- CocoaPods
Add the package to your Or in Xcode: File → Add Package Dependencies → paste the repository URL.
Package.swift:iOS Configuration
Add the following to yourInfo.plist:
- Open your
.xcodeprojor.xcworkspacein Xcode - Select your target → Signing & Capabilities
- Click + Capability → Add HealthKit
- Check Background Delivery if you want updates while app is closed
Quick Start
Here’s the minimal code to get health sync working:AppDelegate Setup
For background URL session support, add to yourAppDelegate:
Documentation
Integration Guide
Complete guide to integrating the SDK including authentication flow, backend setup, and best practices.
Troubleshooting
Common issues and their solutions for native iOS.
Supported Health Data Types
The SDK supports 40+ health data types via theHealthDataType enum. Pass these as enum values to requestAuthorization(types:completion:):
Activity & Fitness
Activity & Fitness
Heart & Vitals
Heart & Vitals
Body Measurements
Body Measurements
Blood & Metabolic
Blood & Metabolic
Sleep & Mindfulness
Sleep & Mindfulness
Reproductive Health
Reproductive Health
Nutrition
Nutrition
Workouts
Workouts
Aliases
Aliases
Next Steps
Integration Guide
Complete step-by-step integration guide.
API Reference
Full API documentation on GitHub.

