Skip to content

Quickstart

Pick your platform below. Every WhiskrKit SDK follows the same three steps: add the package, initialise once, and present a survey by identifier. Your API key is in the dashboard under Settings → API Keys.

1. Add the package. In Xcode, File → Add Package Dependencies, enter https://github.com/whiskrkit/whiskrkit-swift.git, and set the rule to Up to Next Major Version.

2. Initialise the SDK as early as possible; your App entry point is the right place.

import SwiftUI
import WhiskrKit
@main
struct MyApp: App {
init() {
WhiskrKit.shared.initialize(apiKey: "wk_live_your_api_key")
}
var body: some Scene {
WindowGroup { ContentView() }
}
}

3. Attach a survey. Add the .whiskrKitSurvey(identifier:) modifier to any view where a survey may appear. WhiskrKit evaluates eligibility automatically.

struct HomeView: View {
var body: some View {
Text("Welcome")
.whiskrKitSurvey(identifier: "your-survey-id")
}
}

That’s it. WhiskrKit handles eligibility checks, presentation timing, and response submission.