> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spatius.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Direct Mode Integration for iOS

> Use the iOS AvatarKit SDK to connect directly to Motion Server with a Session Token.

Use this guide when your iOS app already has avatar speech audio and needs AvatarKit to send that audio to Motion Server, receive motion data, and render the avatar locally.

<Card title="iOS Direct Mode demo" icon="apple" href="https://github.com/spatius-ai/spatius-avatar-demo/tree/main/direct-mode/clients/ios" horizontal>
  Swift / SwiftUI reference implementation for the Direct Mode path.
</Card>

## SDK package setup

<Steps>
  <Step title="Download the framework">
    Download the latest [AvatarKit.xcframework](https://github.com/spatius-ai/avatarkit-ios-release/releases/latest) from the releases page.
  </Step>

  <Step title="Add it to your Xcode project">
    Unzip the archive and drag `AvatarKit.xcframework` into your Xcode project.

    In your target's **General** tab, make sure it appears under **Frameworks, Libraries, and Embedded Content** with **Embed & Sign**.
  </Step>
</Steps>

## Integration flow

<Steps>
  <Step title="Create credentials">
    Create an App ID and Avatar ID in [Spatius Studio](https://app.spatius.ai), then mint a Session Token from your backend. See [Credentials](/getting-started/credentials).
  </Step>

  <Step title="Initialize AvatarKit">
    Initialize the iOS SDK with your App ID, Avatar ID, Session Token, and selected region.
  </Step>

  <Step title="Send avatar speech audio">
    Send PCM16 mono avatar speech audio to AvatarKit. Motion Server returns motion data, and AvatarKit renders the avatar locally. For audio source and timing guidance, see [Audio](/concepts/audio).
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="iOS SDK reference" icon="book" href="/sdk-reference/ios-sdk/api-reference">
    Complete iOS API documentation.
  </Card>

  <Card title="Browse all demos" icon="github" href="/resources/demo-projects">
    Every runnable demo by platform and integration path.
  </Card>
</CardGroup>
