.candidOverlay() modifier to your root view so the research UI has a place to render, then call Candid.register(trigger:) whenever you want a study to begin. All three steps are independent of your navigation stack, the overlay sits above everything else in the window.
Configure the SDK
CallCandid.configure(_:) once before your app presents any UI. The recommended place is App.init, but a .task modifier on the root view also works if you prefer to defer until the first scene appears.
Candid.Configuration accepts the following parameters:
The participant identifier is set separately with
Candid.setUserId(_:), at any time (e.g. after login).
Call
Candid.configure(_:) before Candid.register(trigger:). If you call register(trigger:) first, the SDK has no API key and cannot load or upload a research session.Attach the overlay
Add.candidOverlay() to your root view: the view that fills the entire window. The modifier inserts an invisible layer that Candid uses to present the research bubble, permission prompts, and recording controls above your app’s content.
Register a trigger
CallCandid.register(trigger:) to load the currently running study associated to a trigger from your Candid dashboard and present it to the user. Register triggers when a specific screen appears, or after any meaningful event in your app.
1
From a button
2
On screen appear
3
After an event