> ## 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.

# iOS Quickstart

> Run the native iOS scenario demo with AvatarKit.

<Card title="iOS scenario demo" icon="github" href="https://github.com/spatius-ai/spatius-scenario-demo/tree/main/ios" horizontal>
  Run four complete AvatarKit scenes on an iOS device. Current demo integration: Agora Convo AI.
</Card>

## Prerequisites

* macOS with Xcode and [XcodeGen](https://github.com/yonaskolb/XcodeGen)
* A physical iOS device; AvatarKit and Agora do not include simulator slices in this demo
* Python 3
* Spatius API Key and App ID from [Spatius Studio](https://app.spatius.ai/apps)
* Agora App ID, App Certificate, and published Agent Pipeline ID

## Run it

<Steps>
  <Step title="Clone and start the shared backend">
    ```bash theme={null}
    git clone https://github.com/spatius-ai/spatius-scenario-demo.git
    cd spatius-scenario-demo/backend
    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    cp .env.example .env
    ```

    Set `TRANSPORT=agora` and fill the Spatius and Agora credentials in `.env`. Follow the [backend README](https://github.com/spatius-ai/spatius-scenario-demo/tree/main/backend) to align the ASR resource IDs and TTS sample rate with your published Agora agent, then start the backend:

    ```bash theme={null}
    python server.py
    ```

    <Warning>
      The demo backend is unauthenticated. Run it only on your local machine or a trusted LAN; do not expose it publicly.
    </Warning>

    Keep the printed LAN address—you will enter it on the iOS config screen.
  </Step>

  <Step title="Generate and open the iOS project">
    In a second terminal:

    ```bash theme={null}
    cd spatius-scenario-demo/ios
    xcodegen generate
    open SpatiusScenes.xcodeproj
    ```
  </Step>

  <Step title="Run a scene">
    Build to a connected iOS device. On the config screen, enter the backend LAN address, confirm the credentials, and choose a scene.
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Agora client integration" icon="tower-broadcast" href="/agora-convoai/client" />

  <Card title="iOS SDK reference" icon="book" href="/sdk-reference/ios-sdk/api-reference" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.