Early access preview
iOS quickstart
This guide takes a fresh iOS app from no Caliper to a live “how did you hear about us” survey that fires once after first open and writes the answer into Adjust as an install-level event. Plan on about ten minutes.
1. Add the package
In Xcode, open File → Add Package Dependencies and enter the Caliper Swift Package URL:
https://github.com/caliper-sdk/caliper-ios
Pin to the latest release and add the Caliper product to your app target. If you manage dependencies in Package.swift, add the same URL to your dependencies array and list Caliper under your target’s dependencies.
Caliper has no dependency on the IDFA, the AppTrackingTransparency framework, or any device-graph SDK. The survey result is first-party by construction — the answer comes from the person using the app, not from a probabilistic match.
2. Configure at startup
Call Caliper.configure as early as possible, before the first view renders. In a SwiftUI app, do this in your App initializer; in a UIKit app, do it in application(_:didFinishLaunchingWithOptions:).
import Caliper
@main
struct ExampleApp: App {
init() {
Caliper.configure(apiKey: "cal_live_…")
Caliper.survey(.howDidYouHear)
.after(.firstOpen)
.sync(to: [.adjust, .slack])
}
var body: some Scene {
WindowGroup { ContentView() }
}
}
.survey(.howDidYouHear) selects the question. .after(.firstOpen) is the trigger — Caliper waits for the first launch on a clean install, then schedules the survey for the next natural pause in the session. .sync(to:) names the destinations the answer is forwarded to. Initialize the Adjust SDK in the same launch path so its event API is ready when an answer arrives.
3. Run it on a clean install
Delete the app from the simulator or device first — the survey fires once per install, keyed off first open, so a reinstall is the only way to see it again. Launch the app. After first open you will see a single closed-option survey with the answers in randomized order and a prominent Skip. A skipped survey is better than a guessed answer, so the skip is deliberately easy to reach.
4. Confirm it in Adjust
When someone answers, Caliper forwards the response as a custom in-app event through Adjust’s SDK-to-SDK event API, attached to that install. In your Adjust dashboard, open the app’s events. You will see a how_did_you_hear event carrying the chosen answer as a property — it appears in dashboards and postbacks like any other in-app event, so you can break installs down by self-reported source alongside your existing network data.
Next steps
- Tune the question and answer set: Survey configuration
- Understand why the percentages hold up: Methodology
- See every event field and the Slack digest: MMP sync
- Full designed surface: API reference