Skip to main content
Represents why an entitlement was not granted when presenting an offer. These are business outcomes, not errors — a user dismissing the sheet or having no eligible offers is a valid result. Genuine failures (network, decoding, SDK not configured) are thrown as an EncoreError from try await show(), never delivered here. NotGrantedReason is a String-backed enum, so each case has a stable rawValue you can log.

Definition

Cases

CaseCategoryDescription
.userTappedCloseUserUser tapped the close / “No thanks” button on the sheet.
.userSwipedDownUserUser swiped down to dismiss the sheet.
.userTappedOutsideUserUser tapped the backdrop outside the sheet.
.userCancelledUserUser cancelled mid-flow.
.lastOfferDeclinedUserUser declined the last available offer in the carousel.
.dismissedUserGeneric dismissal when the specific gesture is unknown.
.noOffersAvailableSystemNo offers matched this user (targeting, caps reached, or already claimed).
.unsupportedOSSystemThe device’s iOS version can’t present the SwiftUI offer sheet. Returned immediately on iOS 15–16 (the sheet UI requires iOS 17+); no UI is shown.
.experimentControlExperimentThe user is in the Control cohort of a Net Conversion Lift experiment. A “ghost trigger” exposure was logged for measurement, but no UI was shown. Treat this exactly like a normal not-granted outcome — run your original flow.

Usage

The supported path is the PresentationResult returned by try await show(). Branch on the reason when you need analytics or special handling; otherwise just proceed with the user’s original action (your onPassthrough handler already does this).
For most apps you can treat all not-granted reasons identically — just resume the original action. Distinguish cases only for analytics or experiment reporting.
  • PresentationResult — the result returned by try await show().
  • Errors — genuine failures are thrown as EncoreError, not surfaced as a NotGrantedReason.