HarklyKit

A native Swift package for iOS 17+ and macOS 14+. It identifies the user, queues events offline, registers for push, and renders the messenger, feedback board, changelog and surveys as SwiftUI views.

// Package.swift or Xcode → Add Package
.package(url: "https://github.com/Rad-Soft/HarklyKit", from: "2026.9.1")
import Harkly

@main struct MyApp: App {
  init() {
    Harkly.configure(publicKey: "hk_pub_…")
  }
  var body: some Scene { WindowGroup { ContentView() } }
}

// after sign-in
try await Harkly.identify(HarklyUser(id: user.id, email: user.email, name: user.name, plan: user.plan), jwt: token)

// anywhere
MessengerView()
FeedbackView(board: "feature-requests")
ChangelogView()

Add .harklySurveys() to a root view and the one due survey appears as a card. Forward the APNs token from didRegisterForRemoteNotifications with await Harkly.registerPushToken(deviceToken); replies to a customer's messages then arrive as pushes under your own app, using the APNs key you paste in Settings → Integrations → Push.

Everything queues on disk while the device is offline and replays when the network is back, so identify and track are safe to call from anywhere.