iOS SDK
Swift package that starts a Live Activity and POSTs its push token to Live Hive. Updates and ends come from the dashboard or your API. Your ActivityAttributes and widget UI stay in your Xcode project so you can customize them. Walkthrough: Getting started.
import LiveHive
LiveHive.configure(publicKey: "lh_pub_...")
let activity = try LiveHive.start(
attributes: DeliveryAttributes(),
contentState: .init(status: "preparing", eta: 12)
)
print(activity.id)Install
File → Add Package Dependencies. Paste https://github.com/iangdavis/livehive-ios. Choose 0.2.0 or later. Add LiveHive to the app target.
.package(url: "https://github.com/iangdavis/livehive-ios.git", from: "0.2.0")Production posts to https://www.livehive.dev/v1/activities/register. Override baseURL only for local development.
LiveHive.start(attributes:contentState:)isActivity.request(..., pushType: .token)plus register.- Already called
Activity.request?LiveHive.register(activity). - Retries 429 and 5xx. Replaces the token when ActivityKit rotates it.
configuretakeslh_pub_.... The server key stays in your API.
First success: dashboard Send test update (uses status and eta, matching the getting started sample). Then your backend POSTs update and end.