Skip to main content

Swift Package Manager (Xcode)

1

Open your project

Open your project in Xcode
2

Add package dependency

Go to File → Add Package Dependencies…
3

Enter repository URL

Enter the repository URL: https://github.com/RunanywhereAI/runanywhere-sdks
4

Select version

Select the version (e.g., from: "0.16.0")
5

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

Package.swift

For Swift packages, add the dependency directly to your Package.swift:
Package.swift
dependencies: [
    .package(url: "https://github.com/RunanywhereAI/runanywhere-sdks", from: "0.16.0")
]
Then add the products you need to your target dependencies:
Package.swift
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

ProductDescription
RunAnywhereCore SDK (required for all features)
RunAnywhereLlamaCPPLLM capability with GGUF models
RunAnywhereONNXSTT, TTS, and VAD via ONNX Runtime
Only include the products you need to minimize your app’s binary size. The modular architecture means you can add capabilities incrementally.

Binary Size Impact

ConfigurationApproximate 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:
import RunAnywhere

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

Troubleshooting

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
Ensure you’ve added the correct product to your target’s dependencies. Each module must be explicitly added.
If you encounter linker errors, ensure your deployment target meets the minimum requirements: - iOS 17.0+ - macOS 14.0+

Next Steps

Quick Start

Build your first AI feature →