Purpose
Present an Encore offer using a SwiftUI sheet controlled by view state. Use callbacks to react to the user’s decision.Signature
Parameters
| Name | Type | Description |
|---|---|---|
isPresented | Binding<Bool> | Controls the sheet’s presentation |
onGranted | Entitlement -> Void | Called when an offer is accepted. Use for side effects (analytics, UI). Entitlement state is also published via isActivePublisher |
onNotGranted | NotGrantedReason -> Void | Called when an offer is not granted (user declined or system reason). Proceed with the user’s original action here |
Returns / State
Returns a modified view. Presentation is controlled byisPresented. Entitlement status changes are published via isActivePublisher and queryable with isActive.