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

# Installation

> Install the RunAnywhere Swift SDK via Swift Package Manager

## Swift Package Manager (Xcode)

<Steps>
  <Step title="Open your project">Open your project in Xcode</Step>
  <Step title="Add package dependency">Go to **File → Add Package Dependencies...**</Step>

  <Step title="Enter repository URL">
    Enter the repository URL: `https://github.com/RunanywhereAI/runanywhere-sdks`
  </Step>

  <Step title="Select version">Select the version (e.g., `from: "0.19.1"`)</Step>

  <Step title="Choose products">
    Choose the products you need: - **RunAnywhere** (required) – Core SDK - **RunAnywhereLlamaCPP**
    – LLM text generation with GGUF models - **RunAnywhereONNX** – ONNX Runtime for STT/TTS/VAD
  </Step>
</Steps>

## Package.swift

For Swift packages, add the dependency directly to your `Package.swift`:

```swift Package.swift theme={null}
dependencies: [
    .package(url: "https://github.com/RunanywhereAI/runanywhere-sdks", from: "0.19.1")
]
```

Then add the products you need to your target dependencies:

```swift Package.swift theme={null}
targets: [
    .target(
        name: "YourApp",
        dependencies: [
            .product(name: "RunAnywhere", package: "runanywhere-sdks"),
            .product(name: "RunAnywhereLlamaCPP", package: "runanywhere-sdks"),
            .product(name: "RunAnywhereONNX", package: "runanywhere-sdks"),
        ]
    )
]
```

## Available Products

| Product               | Description                          |
| --------------------- | ------------------------------------ |
| `RunAnywhere`         | Core SDK (required for all features) |
| `RunAnywhereLlamaCPP` | LLM capability with GGUF models      |
| `RunAnywhereONNX`     | STT, TTS, and VAD via ONNX Runtime   |

<Tip>
  Only include the products you need to minimize your app's binary size. The modular architecture
  means you can add capabilities incrementally.
</Tip>

## Binary Size Impact

| Configuration       | Approximate Size |
| ------------------- | ---------------- |
| LLM only            | \~17 MB          |
| STT only (ONNX)     | \~52 MB          |
| LLM + STT + TTS     | \~87 MB          |
| Full (all backends) | \~95 MB          |

## Verify Installation

After installation, verify everything is working:

```swift theme={null}
import RunAnywhere

// Check SDK version
print("SDK Version: \(RunAnywhere.version)")
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="Package resolution fails" icon="rotate">
    Try resetting package caches: 1. Go to **File → Packages → Reset Package Caches** 2. Clean the
    build folder: **Product → Clean Build Folder** 3. Try adding the package again
  </Accordion>

  <Accordion title="Module not found errors" icon="magnifying-glass">
    Ensure you've added the correct product to your target's dependencies. Each module must be
    explicitly added.
  </Accordion>

  <Accordion title="Linker errors with XCFrameworks" icon="link-slash">
    If you encounter linker errors, ensure your deployment target meets the minimum requirements: -
    iOS 17.0+ - macOS 14.0+
  </Accordion>
</AccordionGroup>

## Next Steps

<Card title="Quick Start" icon="rocket" href="/swift/quick-start">
  Build your first AI feature →
</Card>
