SDK Overview
Understand how the Setgreet SDK powers in-app experiences.
SDK Overview
The Setgreet SDK is a lightweight native library that you embed in your mobile app. It is the bridge between the flows you design in the dashboard and the screens your users see on their devices.
How the SDK works
The SDK handles three core responsibilities:
- Forward user signals -- when your app calls
identifyUser,trackEvent, ortrackScreen, the SDK sends that signal to the Setgreet API. The server evaluates trigger conditions for the current user and decides whether a flow should be shown. - Render natively -- when the API returns a matching flow, the SDK renders it using fully native UI components (SwiftUI on iOS, Jetpack Compose on Android). There are no web views or iframes. Screens use a flexbox-based layout system that adapts to any screen size automatically.
- Track events -- flow displays, screen views, component interactions, and dismiss events are tracked and sent to the Setgreet API for analytics.
Dashboard and SDK relationship
The dashboard is where you design and publish flows. The SDK is where flows come to life on a user's device.
| Action | Where it happens |
|---|---|
| Create and edit flows | Dashboard |
| Define trigger conditions | Dashboard |
| Publish a flow | Dashboard |
| Forward user signals | SDK (network call) |
| Evaluate triggers | Server (Setgreet API) |
| Render screens | SDK (native UI) |
| Collect interactions | SDK, sent to API |
This separation means your team can update flows, change targeting, and publish new experiences without touching app code or waiting for an app store release.
What you need to implement
The SDK is designed to require minimal integration code. At a minimum, you need to:
- Initialize the SDK with your App Key on app launch.
- Identify users by calling
identifyUserwith a user ID and attributes after login. - Track events (optional) if you want to trigger flows based on custom events.
Everything else -- server evaluation of triggers, rendering screens, and tracking analytics -- is handled automatically.
The SDK requires a network connection to fetch flows. Offline flow caching is not supported today.
Next steps
| Topic | What you will learn |
|---|---|
| User Identification | How to identify users and set attributes. |
| Event Tracking | How to track custom events and screen views. |
| Displaying Flows | How to control when and how flows appear. |
| Platform SDKs | Installation guides for iOS, Android, React Native, and Flutter. |