Skip to main content
Creates a placement builder for presenting offers. It is the one way to present, and it matches the builder across every Encore SDK.

Signature

placement() is static: call it as Encore.placement('cancel_flow'). Each option returns a new builder, so a builder can be reused or shared without one call site changing another’s configuration.

Parameters

show()

show() fetches offers, presents the native offer sheet, and completes when the presentation record is sealed. It never throws on iOS or Android: every failure, including “nothing was presented”, is a value on the returned EncorePresentationResult.

Use cases

useCase() selects which Encore surface the placement presents. It defaults to EncoreUseCase.reduceChurn.
The case names describe the capability; nativeValue is the label the backend stores.
A use case with no enabled variant resolves EncoreNotPresented with EncoreNotPresentedReason.useCaseUnavailable rather than falling back to the churn-intervention sheet.

Copy overrides

headline() and subheadline() override the sheet’s copy for one presentation, on every use case. The native side writes the value into the variable the active template reads. Priority order, first one set wins: this value, then the copy configured for your app in the Encore portal, then the shipped template default. A blank string is ignored. You pass the finished string, so localization, pluralization, wording, and emoji stay yours.

Platform notes

  • iOS presents only on iOS 17 or later. On older versions show() resolves EncoreNotPresented with EncoreNotPresentedReason.unsupportedOS, even though the plugin installs on iOS 15.
  • Android attaches the sheet to the Activity the plugin is bound to. With no foreground Activity, show() resolves EncoreNotPresentedReason.noForegroundActivity.