Developer docs

The wandkit iOS SDK

One Swift package, no runtime dependencies, a handful of static calls. Add it and your app has event-triggered surveys and an in-app feedback board, on iOS 15 and up.

iOS 15+ · Swift Package Manager · Private beta

The calls you will actually write

This is every call most apps ever make. There is no builder, no nested namespaces, no WandKit delegate to implement. The rest of the surface is push permission helpers and the referral calls.

import WandKit

WandKit.configure(apiKey: "wk_...")
WandKit.identify("user_123", displayName: "Jane Appleseed")
WandKit.event("checkout_completed", properties: ["plan": "pro"])
WandKit.presentFeedback()
WandKit.registerDeviceToken(deviceToken)
WandKit.logout()

iOS 15+ Swift Package Manager No runtime dependencies Private beta

Quickstart

Install, configure, identify, send an event, open the board. Six steps, all of them copy-paste.

1. Add the package

In Xcode, use File, then Add Package Dependencies, and paste the repository URL. Or declare it yourself.

// Package.swift
dependencies: [
    .package(url: "https://github.com/FlabbergastAgency/wandkit-ios", from: "0.1.0")
]

// then add the product to your target
.product(name: "WandKit", package: "wandkit-ios")

2. Configure

Call this once at app startup, before any other WandKit function. The API key is the wk_ key from your project settings.

import WandKit

WandKit.configure(apiKey: "wk_...")

// with a theme for the native survey cards
WandKit.configure(apiKey: "wk_...", theme: .default)

3. Identify the user

Call this after sign-in, or whenever the user becomes known. The display name is a suggestion shown on their posts and comments until they set their own name in the feedback UI, and re-identifying never overwrites a name they chose themselves.

WandKit.identify("user_123")
WandKit.identify("user_123", displayName: "Jane Appleseed")

// on sign-out, so the device stops receiving their notifications
WandKit.logout()

4. Send an event

The event goes to wandkit and, if a survey is configured for that event name, the form is presented automatically. Nothing else to wire up.

WandKit.event("checkout_completed")

WandKit.event(
    "onboarding_finished",
    properties: [
        "plan": "pro",
        "source": "paywall"
    ]
)

5. Open the feedback board

The SDK finds the top-most view controller of the active scene itself, so from SwiftUI or UIKit alike this is one line. Pass from: only when you need to anchor to a specific controller.

WandKit.presentFeedback()

// or take the controller and present it your own way
let feedback = WandKit.feedbackViewController()
navigationController.pushViewController(feedback, animated: true)

6. Forward the push token

Optional, and only if you want notifications. wandkit does not swizzle your app delegate. Hand it the token iOS gives you and it does the rest.

final class AppDelegate: NSObject, UIApplicationDelegate {
    func application(
        _ application: UIApplication,
        didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
    ) {
        WandKit.registerDeviceToken(deviceToken)
    }
}

In SwiftUI, wire it up with @UIApplicationDelegateAdaptor. Your target also needs the Push Notifications capability, which creates the aps-environment entitlement for you. You never tell the SDK which environment you are in: it reads the value Apple signed the build with and reports it at registration.

Where to go next

Six areas worth reading before you wire anything up.

Server-driven

Surveys and triggers

Fire an event, the backend decides whether a survey comes back. Rules cover the exact Nth or every Nth occurrence, a cooldown, an app-version comparison and a priority order. Six page types: stars, thumbs, multiple choice, free text, notifications opt-in and an end page, with branching on thumb.up, star.N and option ids.

Titles, options and buttons live server side. Change a question with no app release.
In-app, WKWebView

Feedback board

Posts, votes, threaded comments, follows, reports, and image or video attachments. As the user types a title the composer offers up to five similar posts so they can vote instead of filing a duplicate.

Every post created through the SDK is pre-moderated. That cannot be disabled.
APNs

Push notifications

Device registration, permission status, and a durable detach on logout that retries on next launch if the network was down. feedbackScreen(forNotification:) resolves a tap to the right screen and returns nil for payloads it does not recognize, so it is safe to call unconditionally. A post author is notified when their feedback goes live.

No app delegate swizzling. APNs only.
Beta

Referrals

Invite links, a hosted branded landing page, browser-fingerprint install matching, manual code redemption, reward progress, and RevenueCat entitlement grants. Detection and redemption are separate on purpose: detect early while the fingerprint is still accurate, ask the user later.

Your backend reports conversions with a wks_ key. Not drop-in, and not marketing attribution.
Two themes

Theming and screenshots

WandKitTheme styles the native survey cards. WandKitFeedbackTheme styles the hosted feedback app: primary color, background, corner radius, color scheme and font family, serialized into the webview as CSS custom properties. Screenshot bug reports are opt-in and re-render your own window, so they never touch Photos and never prompt for permission.

WandKit.configure(apiKey:theme:feedbackTheme:)
wandkit

CLI and forms as code

Keep your forms in your repo as JSON, review them in pull requests, and push them back. The CLI also tails events, lists and updates issues, manages campaigns and API keys, and exports responses as NDJSON.

Three key types: wk_ for the SDK, wks_ for your server, wkp_ for the CLI.

Forms as code

Bind a directory to a project once and your survey definitions become files you can diff. wandkit projects use writes the .wandkit.yml that pins the project id, so agents and CI need no flags.

# authenticate with a personal access token
export WANDKIT_TOKEN=wkp_...

# bind this repo to a project (writes .wandkit.yml)
wandkit projects use 

# pull, review, push
wandkit forms pull
wandkit forms diff forms/onboarding.json
wandkit forms validate forms/onboarding.json
wandkit forms push forms/onboarding.json

# confirm the integration is really sending
wandkit events tail
wandkit responses export --form 

Files land at forms/.json, one per form, identified by the form's own key rather than a project-specific id, so the same file pushes to staging and to production. Push replaces every editable field on the target form rather than merging it, so run diff first if someone may have edited that form in the dashboard since you pulled.

Before you ship

The constraints worth knowing on day one, rather than after your first support ticket.

  • Anonymous sessions are read-only. Without a prior identify call the user can read the feed but cannot post, comment or vote. Nothing errors and nothing is hidden. The web app simply renders without the write actions.
  • Pre-moderation is mandatory. Every post created through the SDK lands pending until a team member approves it in the dashboard. Your own first test post will not appear until you approve it.
  • iOS only. There is no Android SDK and no React Native binding. Android device tokens can register, but nothing is sent to them. macOS 10.15 compiles, but presents no UI.
  • English only. The SDK's survey chrome is hardcoded English. The screenshot and offline strings are NSLocalizedString keys your own Localizable.strings can override. API error strings exist in English and Croatian. Server-driven localization is coming, but it is not available yet.
  • Deep links are not live yet. Today a referral link lands on a web page with store buttons, so it does not open your app. Smart deep linking is coming.
  • Events power triggers and a raw log. The log is paginated and filterable by event name, and it exists so you can verify your integration. There are no charts, funnels, cohorts or retention yet. Behavioral event analytics is coming.
  • The dashboard signs in with Google.
  • Questions. Write to info@wandkit.app.