Install
Add github.com/buzzkit-dev/buzzkit-ios in Xcode under File → Add Package Dependencies, or declare it inPackage.swift:
The package requires iOS 15 or Mac Catalyst 15 and builds with the Swift 6 toolchain under strict concurrency.
Configure
Callconfigure once, as early in launch as you can. Calling it again logs a warning and keeps the first configuration.
BuzzKit.isConfigured tells you whether it has run. Every other call on BuzzKit logs an error and does nothing until it has.
Configuration options
BuzzKit.Configuration takes one required argument and seven optional ones.
Setting
appGroup also writes the API key and API URL into the shared container so the notification service extension can send delivered receipts on its own. Give the app and the extension the same group in Xcode’s Signing & Capabilities. See Push notifications.The client key
Create a client key on the dashboard’s API keys page. It carries thebk_pk_ prefix and is the only kind of key meant to ship inside an app binary: it can reach /v1/client/* and nothing else, so it can identify a user, register a device, track events, and read or update that subscriber’s own preferences. It cannot send a message, read another subscriber, or reach any other tenant. Extracting it from your binary buys an attacker nothing they could not do by installing the app.
Key kinds and scopes are covered in full under Authentication.
Self-hosting
PointapiURL at your own deployment. Everything else is identical, including the client key format.
Xcode capabilities
A Swift package cannot add capabilities or Info.plist keys to your app, so set these once on the app target.Next
Push notifications
Registration, permission, token rotation and the service extension.
Identity
Anonymous ids, identify, logout and identity verification.
Events
Tracking, the offline queue and the reserved
$ events.Deep links
Route a notification’s link, or run a remotely named action.
Preferences
The drop-in settings screen, or your own UI over the topics API.
Live Activities
Token plumbing for activities started and updated from the server.