# getPresentationResult()

Check the outcome of a placement without presenting a paywall.

Purpose [#purpose]

Retrieves the presentation result for a placement without presenting the paywall. Call this when you need to know whether a placement would show a paywall, send the user to a holdout, or fail due to missing configuration before you decide how to render UI.

Signature [#signature]

```swift
public func getPresentationResult(
  forPlacement placement: String,
  params: [String: Any]? = nil
) async -> PresentationResult
```

```swift
public func getPresentationResult(
  forPlacement placement: String,
  params: [String: Any]? = nil,
  completion: @escaping (PresentationResult) -> Void
)
```

Parameters [#parameters]

<TypeTable
  type="{
  placement: {
    type: &#x22;String&#x22;,
    description: &#x22;The placement you want to evaluate.&#x22;,
    required: true,
  },
  params: {
    type: &#x22;[String: Any]?&#x22;,
    description: &#x22;Optional parameters passed to audience filters. Keys starting with `$` are reserved by Superwall and removed. Nested dictionaries and arrays are ignored.&#x22;,
    default: &#x22;nil&#x22;,
  },
}"
/>

Returns / State [#returns--state]

Returns a `PresentationResult`, which can be:

* `.placementNotFound` – The placement name is not attached to any campaign.
* `.noAudienceMatch` – No audience matched, so nothing would be shown.
* `.paywall(experiment: Experiment)` – A paywall would be shown; the experiment contains assignment info.
* `.holdout(experiment: Experiment)` – The user would be held out of the paywall for the experiment.
* `.paywallNotAvailable` – The SDK could not show a paywall (for example, no window to present from).

Usage [#usage]

```swift
let result = await Superwall.shared.getPresentationResult(
  forPlacement: "premium_feature",
  params: ["source": "settings"]
)

switch result {
case .paywall(let experiment):
  analytics.log("Paywall would show", metadata: [
    "experimentId": experiment.id,
    "groupId": experiment.groupId
  ])
case .holdout(let experiment):
  showHoldoutBadge(for: experiment)
case .noAudienceMatch:
  unlockFeature()
case .placementNotFound:
  assertionFailure("Missing campaign setup")
case .paywallNotAvailable:
  fallbackToDefaultFlow()
}
```

```swift
Superwall.shared.getPresentationResult(forPlacement: "premium_feature") { result in
  guard case .paywall(let experiment) = result else {
    return
  }

  // Update UI with experiment metadata while keeping the user on the current screen
  self.paywallExperimentId = experiment.id
}
```

Related [#related]

* [`register()`](/docs/ios/sdk-reference/register) – Registers a placement that may present a paywall.
* [`PaywallPresentationHandler`](/docs/ios/sdk-reference/PaywallPresentationHandler) – Observe the lifecycle when you do present a paywall.