Getting Started
Quickstart
Install the SDK, track your first event, and see it in the dashboard.
Get Pricist running in your iOS app in a few minutes: install the SDK, initialize it, track an event, and watch it land in your dashboard.
1. Get your SDK key
In the Pricist dashboard, open Settings → SDK key and copy your publishable key. It looks like pk_live_… (use pk_test_… against a dev environment).
2. Install the SDK
Add the package in Xcode via File → Add Package Dependencies… with the URL https://github.com/Pricist/pricist-ios, or add it to your Package.swift:
dependencies: [
.package(url: "https://github.com/Pricist/pricist-ios", from: "0.1.0")
]Then add Pricist to your target. See Installation for details.
3. Initialize
Initialize the SDK early in your app's lifecycle:
import Pricist
@main
struct MyApp: App {
init() {
Pricist.shared.initialize(with: PricistConfiguration(sdkKey: "pk_live_…"))
}
var body: some Scene { WindowGroup { ContentView() } }
}On first launch the SDK automatically fires an Install event, and an ActivateApp event on every cold start — so you'll see activity in the dashboard immediately.
4. Track your first event
Track a standard subscription event anywhere in your app:
Pricist.shared.trackPurchase(value: 29.99, currency: "USD")Or a custom event:
Pricist.shared.trackEvent("onboarding_complete")Events are queued and flushed automatically; you can force a send with Pricist.shared.flush().
5. See it in the dashboard
Open your Pricist dashboard — your Install, ActivateApp, and tracked events appear in the live event stream within seconds. From there you can build revenue reports, funnels, and cohorts.