Mobile SDKs overview
A mobile app talks to Releva through one of the mobile SDKs. The SDK tracks what the shopper does, fetches the product blocks, banners, stories and surveys configured for each screen, registers the device for app push and reads the App Inbox. Your backend still sends the catalog, paid orders, refunds, profile data and marketing consent through the server APIs.
This page is the map. Each platform has its own setup page with the code.
Pick your SDK
Section titled “Pick your SDK”| App stack | SDK | Latest release | Setup page |
|---|---|---|---|
| React Native with Firebase messaging and notifee | @releva-ai/sdk-react-native |
0.4.3 | Connect your React Native app |
React Native with Expo and expo-notifications |
same package, /expo adapter |
0.4.3 | Push notifications with Expo |
| iOS, Swift | RelevaSDK (Swift Package Manager) |
5.2.1 | Connect your iOS app |
| Android, Kotlin | com.github.Releva-ai:sdk-kotlin (JitPack) |
1.8.0 | Connect your Android app |
| Flutter | releva_sdk (pub) |
0.3.2 | Connect your Flutter app |
What changed in each release is in the integrations changelog.
Four things to set up in the Releva admin
Section titled “Four things to set up in the Releva admin”None of them is on a mobile-specific screen. There is no “mobile app” platform, connector or switch in the admin; the shop’s Platform stays whatever your web shop is.
- Access Token. The SDK client takes it as its second argument (
new RelevaClient('', '<accessToken>')). Copy it from Settings › Shop & Integration › General: Find your Access Token and Secret Key. The access token is a public key and ships inside the app. Never put the Secret Key in an app. - Page tokens. Every screen that should record a page view, or receive product blocks, banners and stories, sends the token of a Releva page as its
screenToken. Pages and their tokens live on Personalization › Product Blocks, in the Token: bar under the page selector: Pages and tokens. A screen sent without a token, or with a value Releva does not know, is accepted with200but records nothing and gets no blocks. Names you make up, such ashome_screen, are not tokens. - Firebase credentials, only for app push and App Inbox. Upload the Firebase service account on Settings › Messaging › Push Notifications: Add your Firebase credentials for app push.
- Verify that token registrations and screen views arrive: Check that your mobile app is connected.
realm is the client’s first argument. Leave it '': the SDK then calls https://releva.ai. A non-empty realm becomes https://<realm>.releva.ai. The admin shows no realm; use one only if Releva gives you one.
What every SDK sends
Section titled “What every SDK sends”All calls go to https://releva.ai/api/v0 with authorization: Bearer <accessToken> and content-type: application/json. The SDKs identify the shopper by deviceId and profileId only. They never send an e-mail address, phone number, name or consent.
| Data | Endpoint | When |
|---|---|---|
| Screen, product and search views, custom events, cart and wishlist changes, checkout | POST /push |
On every track* call. The response carries the product blocks, banners, stories and NPS surveys for the screen. setCart and setWishlist store on the first call and send a push on later changes. trackCheckoutSuccess sends the paid cart, then clears the stored cart. |
| App push token | POST /appPush/tokens |
When the app calls registerPushToken; the Swift SDK also re-registers on every foreground and profile change when pushTokenProvider is set. Each call writes a Push Notification Subscribe event and creates a placeholder profile if the profile id is new. Reference: Register a mobile app push token. |
| Push tap (click tracking) | GET of the push’s callbackUrl |
When the shopper taps a Releva push. |
| Banner impressions, banner and story actions | POST /impressions, POST /push/events |
When a banner is shown, tapped or closed, and on story interactions. |
| NPS answer | POST /nps/{token}/submissions |
When the shopper submits a survey. |
| App Inbox | GET /inbox/messages, GET /inbox/unread-count, POST …/read, POST …/read-all, DELETE …/{id}, POST …/action |
After initializeInbox(), on a silent sync push and on resume when the cache is older than 5 minutes. Reference: Inbox API overview. |
Only tokens registered as android or ios ever receive a push. huawei and other are accepted and stored but never targeted.
What your backend still sends
Section titled “What your backend still sends”The app covers what the shopper does on the device. Everything else goes through the server APIs with the Secret Key:
| Data | Reference |
|---|---|
| Products, and the full-catalog pull sync as a safety net | Catalog API overview, How Releva connects to your shop |
| Paid orders placed outside the app, refunds | Orders API overview |
| Profile attributes (e-mail, phone, name) and registrations | Profiles API overview |
| Marketing consent | Consent API overview. A token registration is not a consent decision: a new profile created by one has no consent, and an existing profile’s consent is not changed. The OS notification permission is the opt-in for push. |