# Stork Live: iOS

The native Stork Live client for iOS and macOS, drawn with Metal.

Tested 2026-12-02. HTML: https://www.stork.ai/live/docs/ios

## Before you start

iOS 16 or macOS 13, or later. The package has no third-party dependencies.

## Install

In Xcode: File > Add Package Dependencies, and give this address.

```text
https://github.com/jupiterspins/stork-live.git
```

## Code

```swift
// Swift package: https://github.com/jupiterspins/stork-live.git
import StorkLive

struct Presenter: View {
    @State private var face: StorkLiveView?
    var body: some View {
        StorkLiveAvatarView(avatar: "a") { face = $0 }
            .aspectRatio(1, contentMode: .fit)
    }
}

// a voice agent's reply, piece by piece
try? face?.appendAudio(samples, sampleRate: 24000)
```

For a sound file, call face?.speak(url:). When the user interrupts, call face?.stop().

## Check it works

A face that blinks, with the Powered by stork.ai mark in the corner. When you hand it audio, the lips move and the sound plays.

## If it does not

- **The lips lag or stutter with a live agent.** Hand each piece to appendAudio on the main thread, as it arrives.
- **You hear the voice twice.** The view plays the sound itself. Do not also play it in the app.

## Next

Change the letter to change the face: 'a' to 'h' are free. To use a face of your own without the mark, see Your own avatar.
