Skip to main content

Overview

Apple Health integration uses a push-based model where health data is sent from the user’s device to Open Wearables using our mobile SDK. This is different from cloud providers like Garmin or Polar that use webhooks.
Why Push-Based? Apple HealthKit doesn’t expose a cloud API. Health data lives exclusively on the user’s device, so your mobile app must actively push data to your backend using our SDK.

Integration Options

Flutter SDK

Cross-platform SDK for iOS and Android. Recommended for most applications.

XML Import

Import Apple Health data from XML exports. Useful for one-time migrations.

Flutter SDK Quick Start

The fastest way to integrate Apple Health:
import 'package:health_bg_sync/health_bg_sync.dart';

// 1. Configure SDK
await HealthBgSync.configure();

// 2. Sign in with credentials from your backend
await HealthBgSync.signIn(
  userId: credentials.userId,
  accessToken: credentials.accessToken,
);

// 3. Request permissions
await HealthBgSync.requestAuthorization(
  types: [
    HealthDataType.steps,
    HealthDataType.heartRate,
    HealthDataType.sleep,
  ],
);

// 4. Start background sync
await HealthBgSync.startBackgroundSync();

Full Integration Guide

Complete step-by-step guide including backend setup, authentication flow, and best practices.

Requirements

RequirementDetails
iOS VersioniOS 13.0+
Apple Developer AccountRequired for HealthKit entitlement
Physical DeviceHealthKit doesn’t work in iOS Simulator

Supported Data Types

Apple Health provides the widest range of health data types:
  • Activity: Steps, distance, flights climbed, active energy
  • Heart: Heart rate, resting HR, HRV, VO2 max
  • Sleep: Sleep sessions with stages
  • Workouts: All workout types with detailed metrics
  • Body: Weight, height, body fat percentage
  • Nutrition: Dietary intake tracking
See the Flutter SDK documentation for the complete list of supported types.