Mobile SDKs overview
The Grona mobile SDKs let Grona personalise screens inside your existing Android and iOS apps. You add placements to your screens once and ship one release. After that, what fills each placement, for which shoppers and against which control group is configuration in Grona, not app code. Read this page first to understand what the SDKs do and what your app has to provide.
What the SDKs do
Section titled “What the SDKs do”The SDK runs on the device. It applies a signed campaign configuration, decides which campaign each placement shows and which arm the shopper is in, renders or hands over the result, and records events for analysis.
- Signed configuration. Grona publishes one signed JSON configuration per workspace. The SDK applies a copy bundled with your app at launch, then refreshes it from the network. It rejects tampered, rolled-back or expired configurations and keeps the last good one. See Signed configuration.
- Decisions on the device. Audience rules read the basket, the current screen, the shopper’s context and, for identified customers, a profile your app supplies. Assignment to variants and holdouts is deterministic and identical on Android, iOS and the Grona backend. See Assignment and bucketing.
- Measurement for every arm. Control and holdout shoppers are measured on the same anchor as treatment shoppers, so results compare like with like. See Events and exposure.
- Money verified on the server. An offer that carries a reward renders only with a grant signed by Grona, and your order backend verifies that grant before applying anything. See Offers and grants.
- Fail safe. Apart from rejecting invalid options when you build them, the SDK never throws into your app. Any error ends in an empty placement or a missing offer, never a crash or a blocked order.
Two rendering modes
Section titled “Two rendering modes”Each campaign renders in one of two ways. You can mix them in one app, placement by placement.
- SDK-rendered components. You add a slot view to your layout. Grona draws a native banner, progress bar, offer or message inside it, styled with your app’s fonts and colours. See Grona components.
- Host-rendered decisions. You ask for a decision for a placement and draw the result with your own product cells, prices and stock. Grona tells you which products to show and with what title. Decisions are product rails, bundles, single product cards and out-of-stock substitutes.
Rendering modes compares the two and helps you choose.
What the SDKs need from your app
Section titled “What the SDKs need from your app”The SDK never reaches into your app’s code or data on its own. Your app gives it what it needs:
- A host implementation. Your app answers product lookups (name, price, stock, image) from memory, adds lines to the basket, replaces a basket line, and opens typed routes such as a product or category screen with your own router. The SDK calls these on the main thread only.
- State pushes. Your app pushes the basket whenever it changes, the shopper’s context (locale, store branch and delivery type), the opaque customer id when a shopper signs in, an optional profile from your authenticated session, and the shopper’s consent.
- Commerce events. Your app forwards product views, basket changes, checkout starts and purchases, so Grona can measure outcomes.
- Signing keys and endpoints. Your app ships the public keys that verify configurations and grants, and the URLs for the configuration, events and preview pairing.
- A backend for offers. If you run offers with a reward, your backend fetches grants for the signed-in shopper and verifies them again when the order is placed. See Backend integration overview.
Platform requirements
Section titled “Platform requirements”| Platform | Minimum version |
|---|---|
| Android | Android 7.0 (API level 24) or later |
| iOS | iOS 16 or later |
Both SDKs share one contract: the same configuration, the same events, the same bucketing and the same security rules. Each platform’s pages note the few differences. A shopper gets the same arm on both platforms when the campaign assigns by customer.