Quickstart

Three lines of Swift puts a support conversation inside your app. This page takes you from an empty project to a working chat sheet.

1. Get a publishable key

Create a project in the dashboard. Each project gets a publishable key beginning ck_. It identifies your app to the API and is safe to ship inside your binary — it grants no access to anyone else’s data, and it cannot read a user’s conversation without a session the server issued.

2. Add the package

In Xcode, choose File › Add Package Dependencies and paste the repository URL:

https://github.com/cluestick-io/cluestick-swift

Or add it to a Package.swift manifest:

Package.swift
dependencies: [
  .package(url: "https://github.com/cluestick-io/cluestick-swift", from: "0.5.0")
]

The package vends two libraries. Cluestick is the client and has no UI. CluestickUI adds the drop-in SwiftUI screens. Add both if you want the ready-made chat; add only Cluestick if you intend to build your own interface against the client.

3. Configure at launch

Call configureonce, as early as you can — every other call throws CluestickError.notConfigured until you do.

NorthlightApp.swift
import Cluestick
import SwiftUI

@main
struct NorthlightApp: App {
  init() {
    Cluestick.configure(apiKey: "ck_live_8f2a…")
  }

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

4. Present the chat

Attach the sheet to whatever already opens your help screen — a toolbar button, a settings row, a menu item.

ContentView.swift
import CluestickUI
import SwiftUI

struct ContentView: View {
  @State private var showSupport = false

  var body: some View {
    Button("Support") { showSupport = true }
      .cluestickChatSheet(isPresented: $showSupport)
  }
}

That is the whole integration. The sheet presents a full conversation with its own navigation bar and a Done button, so it needs no wrapping.

What you see on the other side

Replies happen in the dashboard, where the conversation opens beside what you already know about the person — their subscription from RevenueCat, recent crashes from Sentry, and their last events from PostHog or Mixpanel, if you have connected those integrations.

Where to go next

  • Installation— platform requirements, and what the two libraries contain.
  • Identity— anonymous users, signing an identity token on your backend, and what reset() does at logout.
  • API reference— every public type and function.