configure and expose no setter afterwards, so this is the only place to register it.
Signature
Parameters
EncoreLogLevel
EncoreLogLevel.debug during development to see detailed native logs, then EncoreLogLevel.none for production builds.
EncoreUnlockMode
Set once, at configure. It selects how a claim flow runs, never how a result is read: the presentation record is written identically in both modes.
API keys
Use the test key (
pk_test_...) during development to exercise the entire entitlement lifecycle end to end. It serves a demo catalog, so the claim, the advertiser page, and the unlock all work without a live campaign or a real payout.Your own offers do not appear under a test key. For that, use the live key and accept that the traffic is recorded. See what a test key serves.Usage
Calling configure more than once
Callconfigure() exactly once. Repeat calls are not safe to rely on:
- Android ignores a repeat call entirely, controller included, so a controller the first call omitted can never be added.
- A repeat call without a controller clears the Dart-side controller while the native side still routes purchases to the plugin, so every later purchase records
EncorePublisherOutcome.failed.
Configuring without a purchase controller
If your Encore flows include no in-app purchase, omit the argument. The SDK then never attempts a purchase, and every presentation recordsEncorePublisherOutcome.notAttempted. That is a supported configuration.
Methods called before
configure() do nothing: identify(), setUserAttributes(), and reset() complete without effect, and show() resolves EncoreNotPresented with EncoreNotPresentedReason.notConfigured.Related
- EncorePurchaseController: the shape of the
purchaseControllerargument - outcomes: the stream that
EncoreUnlockMode.strictfeeds late verifications into - Configure the SDK for the step-by-step walkthrough