Skip to content

fixie-ai/ultravox-client-sdk-ios

Repository files navigation

Ultravox client SDK for iOS

iOS client SDK for Ultravox.

swift package

Getting started

iOS app (in XCode)

If you're starting from scratch, strongly consider building with Flutter instead.

If you're not starting from scratch then you probably already know how to add this as a dependency, but it will look something like this:

  1. import Ultravox in any file. After a few seconds you'll see an error about "No such module."
  2. Click on the error and it should give you the option to search package collections. Do so.
  3. Paste this in your search bar (top right) and hit enter: https://github.com/fixie-ai/ultravox-client-sdk-ios
  4. This package should be found and this README should be rendered. Click Add Package.
  5. Pick your App target and again click Add Package.
  6. Increment your XCode frustrations counter and consider switching to Flutter. 😉

See Apple's documentation for more info.

Swift Package

If you're building a package, add this to your Package.swift:

let package = Package(
  ...
    dependencies: [
        .package(url: "https://github.com/fixie-ai/ultravox-client-sdk-ios.git", .upToNextMajor("0.0.1")),
    ],
    targets: [
        .target(
            name: "MyApp",
            dependencies: [
                .product(name: "Ultravox", package: "ultravox-client-sdk-ios"),
            ]
        ),
    ]
)

Usage

let session = UltravoxSession()
await session.joinCall(joinUrl: "joinUrlFromYourServer");
await session.leaveCall();

For a complete example, see https://github.com/fixie-ai/ultravox-client-sdk-ios-example.

To get a joinUrl, you'll want to integrate your server with the Ultravox REST API.

To release a new version:

  1. Create & push a new tag: git tag <new version number> git push origin <new version number>

  2. Create a new release