Signature
Parameters
Options
Unlock mode
'optimistic' records the claim and finishes. 'strict' verifies the claim server-side, persisting unverified claims and re-checking them across launches; those settle later as a strict_unlock_verified event on Encore.onOutcome.
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
EncoreProvider (recommended)
purchaseController prop into configure, which it calls once, on mount. Only the value from the first render is bound; swap it later with Encore.setPurchaseController() if it genuinely needs to change at runtime.
Direct configuration
Configuring without a purchase controller
If your Encore flows include no in-app purchase, omit the option. The SDK then never attempts a purchase, logs its ownsdk_iap_no_purchase_controller diagnostic, and every presentation records publisher: 'not_attempted'. That is a supported configuration and a more accurate record than a failure your app never caused.
Related
- PurchaseController, the shape of the
purchaseControlleroption. - onOutcome(), which
unlock: 'strict'feeds late verifications into.