Skip to content

Core Concepts

WhiskrKit is a feedback layer for your mobile app, not a one-off survey tool. Understanding a few key concepts will help you get the most out of it.

A survey is created and configured in the WhiskrKit dashboard. Each survey has:

  • A unique identifier you reference in your app
  • A type, NPS, star rating, thumbs up/down, or textual
  • A presentation style, sheet, toast, or full-screen
  • Eligibility rules, who sees it, when, and how often

Your app code only needs the identifier. Everything else is controlled from the dashboard, meaning you can change survey behaviour without shipping an app update.

When you attach .whiskrKitSurvey(identifier:) to a view, WhiskrKit checks eligibility before presenting anything. Eligibility rules are configured per survey in the dashboard and can include:

  • Session count, only show after the user has opened the app a certain number of times
  • Cooldown, wait a minimum period before showing again
  • Repeat policy, show once, on a cooldown, or always

If a user does not meet the eligibility criteria, nothing is shown. No code changes required on your side.

WhiskrKit supports two presentation modes.

Attach .whiskrKitSurvey(identifier:) to a view. WhiskrKit checks eligibility when the view appears and presents the survey if the user qualifies.

HomeView()
.whiskrKitSurvey(identifier: "nps-survey")

Place this on a view that represents a meaningful moment in the user journey, after a completed trip, after a purchase, or on your main tab view.

For cases where you control the trigger, a feedback button, a push notification, or a custom event, use the imperative API instead.

Step 1: Register an attachment point once, high in your hierarchy:

@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.whiskrKit()
}
}
}

Step 2: Call present(surveyId:) from anywhere:

Button("Give Feedback") {
WhiskrKit.shared.present(surveyId: "nps-survey")
}

Manual presentation bypasses eligibility checks. The survey is fetched and shown immediately.

WhiskrKit is fully customisable. You can match the look of your app by providing a WhiskrKitTheme:

let theme = WhiskrKitTheme(
primaryColor: .blue,
backgroundColor: .white,
textColor: .black
)
WhiskrKit.shared.setTheme(theme)

A built-in systemStyle preset is available if you want a sensible default that respects iOS conventions:

WhiskrKit.shared.setTheme(.systemStyle)

Theme components include container styles (sheet, toast, full-screen), button styles (primary, secondary, tertiary), and text styles (title, subtitle, headline, body). WhiskrKit supports Dynamic Type and dark mode natively, supply adaptive colours for best results.

Call setTheme after initialize in your app entry point.

When a user completes a survey, WhiskrKit records the completion locally and submits the response to the dashboard. Completion data is used to enforce repeat policies, so a user who already responded to an NPS survey won’t be shown it again until the cooldown expires.

This is why WhiskrKit becomes more useful over time: the longer it runs in your app, the more accurate your eligibility targeting becomes, and the richer your response data grows.