Overview
Encore lets you present a premium brand offer (a real perk a brand funds to acquire customers, such as a free trial, discount, or credit) at critical moments like cancellation flows or feature paywalls.show() resolves with the complete factual record of what happened. There are no global callbacks to register: control flow lives at the call site.
Present an offer
show() never rejects. Every failure, including “nothing was presented”, arrives as a value on the result, so there is no catch block to forget and no silent hang when you do.
Read the result
A single presentation can claim an offer and run a purchase, so the two funnels are recorded side by side rather than competing for one winning value.
There is deliberately no
unlocked boolean. What a claim means is a property of the variant flow that served it, so an SDK-computed verdict could contradict the flow that actually ran. Branch on the raw axes, as above. See PresentationResult.Purchases
A user who accepts an offer that carries an in-app purchase triggers your purchase controller. Pass it toconfigure(); see Configure the SDK.
Observe outcomes globally
For analytics forwarding, app-owned state, or a debug overlay, subscribe to the outcomes stream. It appends rather than replacing, so several observers can listen at once.Full example
Next Steps
- Add Subscription Product - Set up the store subscriptions your controller purchases
- Integration Patterns - Where to put the call site, the controller, and the stream
- SDK Reference - Complete API documentation