Asleep iOS SDK integration reference. Use when building iOS apps with sleep tracking -- covers SDK setup, API surface, permissions, background audio, delegate protocols, error handling, and Siri Shortcuts. Self-contained; does not require sleeptrack-foundation.
The Asleep iOS SDK wraps microphone-based audio capture, upload, and session management behind a delegate pattern. The SDK records ambient audio during sleep, uploads 30-second chunks to Asleep servers for analysis, and returns sleep stage classifications. All tracking state is communicated through delegate callbacks.
x-api-key header. Obtain from the Asleep Dashboard Settings tab.https://api.asleep.aiSwift Package Manager. In Xcode: File > Add Packages, enter the URL. Or add to Package.swift: