Docs

iOS quickstart

Add Hollo to a SwiftUI or UIKit app in about ten minutes. At the end, your app has a Support button that opens a native chat, and your first message is waiting in the inbox.

Requirements

  • iOS 17 or later
  • Xcode 26 or later
  • Your app key from the dashboard (it starts with app_)

Add the package

In Xcode, choose File → Add Package Dependencies… and enter the Hollo package URL from your dashboard. Pick Up to Next Major Version, then add the Hollo library to your app target.

If your project uses a Package.swift instead, add Hollo to dependencies with the same URL and add "Hollo" to your target's dependencies.

Start Hollo when your app launches

Call Hollo.start(appKey:) once, as early as possible. In SwiftUI, the App initialiser is a good place:

import SwiftUI
import Hollo

@main
struct DriftwoodApp: App {
    init() {
        Hollo.start(appKey: "app_XXXX")
    }

    var body: some Scene {
        WindowGroup { ContentView() }
    }
}

Starting Hollo is quick and doesn't block launch. It doesn't show anything or ask the user for anything.

Add a Support button

Show the chat in a sheet from anywhere:

Button("Support") {
    Hollo.present()
}

Or put the chat view inside your own navigation, so it gets your back button and title bar:

NavigationStack {
    List {
        NavigationLink("Support") {
            HolloChat()
        }
    }
}

HolloChat() is a normal SwiftUI view, so you can also put it in a tab, a sheet you manage yourself, or a split view.

Send a test message

Run the app on a device or the simulator, open Support and say hello. The message appears in your inbox within a second, and Hollo AI replies if you've turned it on.

Reply from the inbox and watch it land in the chat.

UIKit

The same calls work from UIKit. Start Hollo in your app delegate:

import UIKit
import Hollo

@main
final class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
        Hollo.start(appKey: "app_XXXX")
        return true
    }
}

Hollo.present() shows the chat over the current screen. To push the chat onto your own navigation stack, or embed it, use HolloChatViewController:

@objc private func supportTapped() {
    let chat = HolloChatViewController()
    navigationController?.pushViewController(chat, animated: true)
}

HolloChatViewController is a regular UIViewController, so you can also add it as a child view controller or put it in a tab bar.

Show an unread badge

Hollo.unreadCount is the number of replies the user hasn't seen. It updates live, and SwiftUI redraws when it changes:

Button {
    Hollo.present()
} label: {
    Label("Support", systemImage: "bubble.left.and.bubble.right")
}
.badge(Hollo.unreadCount)

See Appearance and languages for UIKit and the app icon badge.

Troubleshooting

The message doesn't show up in the inbox.

  • Check the app key matches the app you're looking at in the dashboard. Each app has its own key.
  • Make sure Hollo.start(appKey:) runs before the chat opens. If you call Hollo.present() first, the chat can't connect.
  • Until your workspace has a subscription, only your own test device can chat. See Early access.

The chat says it's offline.

Hollo shows a connection banner when it can't reach the server. Messages you write while offline are sent once the connection comes back, as long as the app stays open. (Keeping unsent messages after the app closes is coming later.) On the simulator, check your Mac's network and any VPN or proxy.

Xcode can't resolve the package.

Copy the package URL again from the dashboard, then try File → Packages → Reset Package Caches. Hollo has no third-party dependencies, so there's nothing else to resolve.

Next steps