Back to Skills

sleeptrack-ios

verified

This skill helps iOS developers integrate the Asleep SDK for sleep tracking functionality. Use this skill when building native iOS apps with Swift/SwiftUI that need sleep tracking capabilities, implementing delegate patterns, configuring iOS permissions (microphone, notifications, background modes), managing tracking lifecycle, integrating Siri Shortcuts, or working with Combine framework for reactive state management.

View on GitHub

Marketplace

sleeptrack-skills

asleep-ai/sleeptrack-skills

Plugin

sleeptrack-skills

Repository

asleep-ai/sleeptrack-skills

skills/sleeptrack-ios/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/asleep-ai/sleeptrack-skills/blob/main/skills/sleeptrack-ios/SKILL.md -a claude-code --skill sleeptrack-ios

Installation paths:

Claude
.claude/skills/sleeptrack-ios/
Powered by add-skill CLI

Instructions

# Sleeptrack iOS

## Overview

This skill provides comprehensive guidance for integrating the Asleep SDK into native iOS applications using Swift and SwiftUI. It covers SDK setup, iOS-specific permissions, delegate-based architecture, tracking lifecycle management, Combine framework integration, and Siri Shortcuts support.

Use this skill when:
- Building native iOS sleep tracking applications
- Implementing SwiftUI-based tracking interfaces
- Managing iOS permissions and background modes
- Working with delegate patterns for SDK callbacks
- Integrating Siri Shortcuts for voice-activated tracking
- Using Combine framework for reactive state management

**Prerequisites**: Developers should first review the `sleeptrack-foundation` skill to understand core Asleep concepts, authentication, data structures, and error handling before implementing iOS-specific integration.

## Quick Start

### 1. Installation

Add AsleepSDK to your Xcode project using Swift Package Manager:

```swift
// In Xcode: File → Add Packages
// Enter package URL: https://github.com/asleep-ai/asleep-sdk-ios
```

Or add to `Package.swift`:

```swift
dependencies: [
    .package(url: "https://github.com/asleep-ai/asleep-sdk-ios", from: "2.0.0")
]
```

### 2. Configure iOS Permissions

Add required permissions to `Info.plist`:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <!-- Microphone access for audio-based sleep tracking -->
    <key>NSMicrophoneUsageDescription</key>
    <string>This app uses your microphone to track sleep stages and detect snoring during sleep.</string>

    <!-- Background audio mode for continuous tracking -->
    <key>UIBackgroundModes</key>
    <array>
        <string>audio</string>
    </array>

    <!-- Optional: For notification reminders -->
    <key>NSUserNotificationsUsageDescription</key>
    <string>Get reminders to start and stop sle

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
13706 chars