Encore.shared.outcomes is the passive observation channel. It mirrors Swift’s AsyncStream and Kotlin’s SharedFlow of placement outcomes.
Use it for anything that watches results without owning a call site: analytics forwarding, app-owned state, a debug overlay. Control flow belongs at the call site, on the value show() returns.
Signature
Usage
EncorePlacementOutcome is sealed, so the switch is exhaustive.
Behavior
- It is a broadcast stream. Several listeners can subscribe at once, matching the multicast streams both native SDKs expose.
- There is no replay. Nothing is buffered for late listeners, by design, since outcomes can carry user-scoped claim data. Subscribe at startup if you want all of them.
- Every
show()the SDK resolves emits, including the ones that presented nothing. AnEncoreNotPresentedresult still arrives as anEncorePlacementPresentation, carrying the sameEncorePresentationResultthe call site received. - Events the plugin doesn’t recognize are dropped, so a newer native SDK can’t emit something this version would misread.
Late strict-unlock verification
EncoreStrictUnlockVerified is the stream’s reason for existing. It has no show() equivalent, because it resolves after its flow ended, possibly on a later launch.
With unlock: EncoreUnlockMode.strict on configure(), a claim that ends unverified persists across process death and is re-checked on later launches. When verification completes, the event is emitted. On iOS the native SDK refreshes its entitlement cache first; Android keeps no such cache, so refresh your own access state when the event arrives. Its transactionId matches the EncoreClaimedOffer.transactionId recorded on the original result, so you can join the two.
Under the default EncoreUnlockMode.optimistic, this event never fires.
Related
- EncorePresentationResult: the payload of
EncorePlacementPresentation - configure(): the
unlockoption that makesEncoreStrictUnlockVerifiedreachable