Documentation Index
Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
Use this file to discover all available pages before exploring further.
Purpose
Create and present Encore offers using a fluent builder API. Fetches available offers for the current user and presents them in a native offer sheet.Signature
PlacementBuilder Methods
| Method | Parameters | Description |
|---|---|---|
placement() | id: String? | Creates a placement with optional identifier. If omitted, auto-generates a unique ID |
show() | — | Suspending — fetches offers and presents the offer sheet. Returns PresentationResult |
show() | scope: CoroutineScope | Fire-and-forget — launches show() in the provided coroutine scope |
Returns
show() returns a PresentationResult:
| Result | Description |
|---|---|
PresentationResult.Completed | User completed an offer flow (tapped CTA, opened link) |
PresentationResult.Dismissed | User dismissed the offer sheet without completing |
PresentationResult.NoOffers | No offers were available for this user / placement |
Usage
Suspend (recommended)
Fire-and-forget
With named placement for analytics
The
show() suspend variant throws EncoreError.Integration.NotConfigured if the SDK hasn’t been configured. The fire-and-forget variant catches and logs errors internally.