Create and present Encore offers using a fluent API that fits naturally in SwiftUI and UIKit. Purchases run through the EncorePurchaseController you register at configure() time.
Selects the surface to present. Defaults to .reduceChurn.
headline(_:)
String
Overrides the sheet’s headline copy for this presentation.
subheadline(_:)
String
Overrides the sheet’s subheadline copy for this presentation.
publisherReward(_:)
PublisherReward
2.3.0+. The prize your app pays for trying an offer. See Reward for Trying.
.presented means the interaction ran: the offer sheet, or on IAP-first variants the purchase sheet that stands in for it.headline(_:) and subheadline(_:) pass the full string through as-is; the SDK never composes copy out of a count. Priority is this override, then the copy Encore resolved for your app, then the shipped template default, and an empty string is ignored so it can’t blank the shipped copy. Encore never translates the string you pass, so localize it yourself. The copy Encore resolves for your app is translated into the user’s language. See Where the copy comes from and Localization.
public enum UseCase: String, Sendable, CaseIterable, Equatable { case reduceChurn = "churn-intervention" // default case rewardUsers = "post-action-reward"}
The raw values are the wire format the backend stores and that analytics splits the funnel on. The case names are the API surface; the raw values are the contract..reduceChurn is the default surface for cancel flows and paywall declines. .rewardUsers presents the reward surface after the user has already done something worth celebrating (a completed purchase, a milestone, a streak); it is not a way to sell. It is claim-only: no in-app purchase runs anywhere in the path, and it never falls back to the paywall sheet. See Reward Users. If no enabled variant resolves for the requested use case, show() resolves with .notPresented(.useCaseUnavailable) and no UI appears.
The facade and builder are @MainActor, so call show() from a main-actor context: a SwiftUI button action, a .task, or a UIKit handler. A SwiftUI Button action is synchronous, so wrap the await in a Task:
Button("Cancel Subscription") { Task { let result = await Encore.shared.placement("cancellation_flow").show() if result.claim != nil || result.publisher == .purchased { // The user claimed an offer or completed your purchase. // Read the concrete entitlement from isActive / isActivePublisher. } else { result.error.map(log) // presentation failures are values proceedWithCancellation() // dismissed, declined, nothing appeared, ... } }}
When the call site can’t await, show(resume:) delivers every outcome on the main actor:
Button("Cancel Subscription") { Encore.shared.placement("cancellation_flow").show { result in if result.claim == nil && result.publisher != .purchased { proceedWithCancellation() } }}
There is no fire-and-forget show() in 2.x. Every presentation resolves exactly once, and the resolution is always delivered, so fallback logic can never be silently skipped.
let result = await Encore.shared.placement("workout_complete") .useCase(.rewardUsers) .headline("Nice work!") .show()
show() is @MainActor: presentation always happens on the main thread. From nonisolated code, await hops to the main actor automatically and the result still resumes there.
From 2.3.0, publisherReward(_:) describes a prize your app pays for trying an offer. When the user says they finished and Encore’s server grants the prize, result.claim?.userConfirmedCompletion is true on the result show() returns (or passes to show(resume:)), and your app grants the prize from that result only (the outcomes stream carries the same result, so granting from both pays twice). The server keys the prize on the ID you pass to identify(), so only identified users are promised one. Setup, the daily limit, and when the flag stays false: Reward for Trying.
The sheet renders in light, dark, or automatic appearance, following the appearance mode configured for your app in the Encore dashboard. Automatic is the default: the presentation window is left unspecified, so the sheet inherits your app’s interface style and switches with it, with no work on your side.
outcomes is the passive stream every resolution also lands on.
isClaimEnabled gates the claim CTA on the cards this presents.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Encore","colors":{"primary":"#3B82F6","light":"#60A5FA","dark":"#2563EB"},"favicon":"https://mintcdn.com/encore-5242061e/Q9j45w34T3HE6gEF/favicon.ico?fit=max\u0026auto=format\u0026n=Q9j45w34T3HE6gEF\u0026q=85\u0026s=f4a721bc5092e5517ad5bb0e80acd195","appearance":{"default":"dark"},"navbar":{"links":[{"href":"mailto:admin@encorekit.com","label":"Support"}]},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"My Dashboard","icon":"gauge","href":"https://dashboard.encorekit.com"},{"anchor":"Support","icon":"envelope","href":"mailto:admin@encorekit.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"encore-5242061e","hasAudioNarration":false,"actualSubdomain":"encore-5242061e","customDomains":["docs.encorekit.com"],"gitSource":{"type":"github","owner":"encorekit","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6aee1f063f800ca0064d7f4a","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Publishers","count":195},{"language":"default","tag":"SDKs","count":175},{"language":"default","tag":"SDK Reference","count":100},{"language":"default","tag":"Bridges","count":73},{"language":"default","tag":"iOS","count":43},{"language":"default","tag":"Web","count":34},{"language":"default","tag":"Unity","count":29},{"language":"default","tag":"Quickstart","count":27},{"language":"default","tag":"Integration Guides","count":26},{"language":"default","tag":"Android","count":25}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"publishers/ios/sdk-reference/placement","slug":"/publishers/ios/sdk-reference/placement","pageMetadata":{"title":"placement()","description":"Create and present Encore offers with a fluent API","href":"/publishers/ios/sdk-reference/placement"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create and present Encore offers with a fluent API\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`purpose`,children:`Purpose`}),`\n`,_jsxs(_components.p,{children:[`Create and present Encore offers using a fluent API that fits naturally in SwiftUI and UIKit. Purchases run through the `,_jsx(_components.a,{href:`/publishers/ios/sdk-reference/purchase-controller`,children:_jsx(_components.code,{children:`EncorePurchaseController`})}),` you register at `,_jsx(_components.a,{href:`/publishers/ios/sdk-reference/configure`,children:_jsx(_components.code,{children:`configure()`})}),` time.`]}),`\n`,_jsx(Heading,{level:`2`,id:`signature`,children:`Signature`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`@MainActor`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` static`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` placement`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` any`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PlacementBuilderProtocol`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`placement(_:)`}),` returns a builder. Configure it with the optional builder methods, then call `,_jsx(_components.code,{children:`show()`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`25`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`25`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`@MainActor`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` protocol`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PlacementBuilderProtocol`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` id: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /// Presents the offer sheet and returns the outcome. Never throws.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` show`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PresentationResult`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /// Callback form: delivers every outcome (including .notPresented) on the main actor.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` show`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`resume`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`@escaping`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` @Sendable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (PresentationResult) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /// Reports when the builder starts and stops loading.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onLoadingStateChange`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` callback`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`@escaping`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` @Sendable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` Self`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /// Selects the surface to present. Defaults to .reduceChurn.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` useCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` useCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: UseCase) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` Self`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /// Overrides the sheet's headline copy.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` headline`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` Self`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /// Overrides the sheet's subheadline copy.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` subheadline`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` Self`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` /// 2.3.0+: the prize your app pays for trying an offer.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` publisherReward`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` reward`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: PublisherReward) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` Self`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Encore.shared.placement(_:)`}),` and the static `,_jsx(_components.code,{children:`Encore.placement(_:)`}),` are equivalent; the static form forwards to the shared instance.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`methods`,children:`Methods`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Method`}),_jsx(_components.th,{children:`Parameters`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`placement(_:)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`id: String?`})}),_jsx(_components.td,{children:`Creates a placement builder with an optional identifier. If omitted, a unique ID is auto-generated.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`show() async`})}),_jsx(_components.td,{children:`None`}),_jsxs(_components.td,{children:[`Presents the offer sheet and returns a `,_jsx(_components.a,{href:`/publishers/ios/sdk-reference/presentation-result`,children:_jsx(_components.code,{children:`PresentationResult`})}),`. Never throws; failures arrive as `,_jsx(_components.code,{children:`.notPresented(.error(EncoreError))`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`show(resume:)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(PresentationResult) -> Void`})}),_jsxs(_components.td,{children:[`Callback form. Delivers every outcome, including `,_jsx(_components.code,{children:`.notPresented`}),`, on the main actor.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`onLoadingStateChange(_:)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`(Bool) -> Void`})}),_jsx(_components.td,{children:`Reports when the builder starts and stops loading, so you can show your own spinner.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`useCase(_:)`})}),_jsx(_components.td,{children:_jsx(_components.a,{href:`#use-cases`,children:_jsx(_components.code,{children:`UseCase`})})}),_jsxs(_components.td,{children:[`Selects the surface to present. Defaults to `,_jsx(_components.code,{children:`.reduceChurn`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`headline(_:)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`String`})}),_jsx(_components.td,{children:`Overrides the sheet’s headline copy for this presentation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`subheadline(_:)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`String`})}),_jsx(_components.td,{children:`Overrides the sheet’s subheadline copy for this presentation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`publisherReward(_:)`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`PublisherReward`})}),_jsxs(_components.td,{children:[`2.3.0+. The prize your app pays for trying an offer. See `,_jsx(_components.a,{href:`/publishers/guides/reward-for-trying`,children:`Reward for Trying`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`.presented`}),` means the interaction ran: the offer sheet, or on IAP-first variants the purchase sheet that stands in for it.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`headline(_:)`}),` and `,_jsx(_components.code,{children:`subheadline(_:)`}),` pass the full string through as-is; the SDK never composes copy out of a count. Priority is this override, then the copy Encore resolved for your app, then the shipped template default, and an empty string is ignored so it can’t blank the shipped copy. Encore never translates the string you pass, so localize it yourself. The copy Encore resolves for your app is translated into the user’s language. See `,_jsx(_components.a,{href:`/publishers/use-cases/post-action-reward#where-the-copy-comes-from`,children:`Where the copy comes from`}),` and `,_jsx(_components.a,{href:`/publishers/concepts/localization`,children:`Localization`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`use-cases`,children:`Use cases`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` enum`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UseCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Sendable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`CaseIterable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Equatable `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` case`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` reduceChurn`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"churn-intervention\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // default`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` case`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` rewardUsers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"post-action-reward\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The raw values are the wire format the backend stores and that analytics splits the funnel on. The case names are the API surface; the raw values are the contract.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`.reduceChurn`}),` is the default surface for cancel flows and paywall declines. `,_jsx(_components.code,{children:`.rewardUsers`}),` presents the reward surface `,_jsx(_components.em,{children:`after`}),` the user has already done something worth celebrating (a completed purchase, a milestone, a streak); it is not a way to sell. It is claim-only: no in-app purchase runs anywhere in the path, and it never falls back to the paywall sheet. See `,_jsx(_components.a,{href:`/publishers/use-cases/post-action-reward`,children:`Reward Users`}),`. If no enabled variant resolves for the requested use case, `,_jsx(_components.code,{children:`show()`}),` resolves with `,_jsx(_components.code,{children:`.notPresented(.useCaseUnavailable)`}),` and no UI appears.`]}),`\n`,_jsx(Heading,{level:`2`,id:`usage-patterns`,children:`Usage Patterns`}),`\n`,_jsx(Heading,{level:`3`,id:`async/await-recommended`,children:`Async/await (recommended)`}),`\n`,_jsxs(_components.p,{children:[`The facade and builder are `,_jsx(_components.code,{children:`@MainActor`}),`, so call `,_jsx(_components.code,{children:`show()`}),` from a main-actor context: a SwiftUI button action, a `,_jsx(_components.code,{children:`.task`}),`, or a UIKit handler. A SwiftUI `,_jsx(_components.code,{children:`Button`}),` action is synchronous, so wrap the `,_jsx(_components.code,{children:`await`}),` in a `,_jsx(_components.code,{children:`Task`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`Button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Cancel Subscription\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` Task`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Encore.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`shared`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`placement`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cancellation_flow\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`show`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result.claim `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result.publisher `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .purchased {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The user claimed an offer or completed your purchase.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Read the concrete entitlement from isActive / isActivePublisher.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(log) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// presentation failures are values`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` proceedWithCancellation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// dismissed, declined, nothing appeared, ...`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`callback-form`,children:`Callback form`}),`\n`,_jsxs(_components.p,{children:[`When the call site can’t await, `,_jsx(_components.code,{children:`show(resume:)`}),` delivers every outcome on the main actor:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`Button`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Cancel Subscription\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Encore.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`shared`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`placement`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cancellation_flow\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`show`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result.claim `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result.publisher `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .purchased {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` proceedWithCancellation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`There is no fire-and-forget `,_jsx(_components.code,{children:`show()`}),` in 2.x. Every presentation resolves exactly once, and the resolution is always delivered, so fallback logic can never be silently skipped.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`selecting-a-use-case`,children:`Selecting a use case`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Encore.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`shared`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`placement`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"workout_complete\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`useCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`rewardUsers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`headline`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Nice work!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`show`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`show()`}),` is `,_jsx(_components.code,{children:`@MainActor`}),`: presentation always happens on the main thread. From nonisolated code, `,_jsx(_components.code,{children:`await`}),` hops to the main actor automatically and the result still resumes there.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`reward-for-trying`,children:`Reward for trying`}),`\n`,_jsxs(_components.p,{children:[`From 2.3.0, `,_jsx(_components.code,{children:`publisherReward(_:)`}),` describes a prize your app pays for trying an offer. When the user says they finished and Encore’s server grants the prize, `,_jsx(_components.code,{children:`result.claim?.userConfirmedCompletion`}),` is true on the result `,_jsx(_components.code,{children:`show()`}),` returns (or passes to `,_jsx(_components.code,{children:`show(resume:)`}),`), and your app grants the prize from that result only (the outcomes stream carries the same result, so granting from both pays twice). The server keys the prize on the ID you pass to `,_jsx(_components.code,{children:`identify()`}),`, so only identified users are promised one. Setup, the daily limit, and when the flag stays false: `,_jsx(_components.a,{href:`/publishers/guides/reward-for-trying`,children:`Reward for Trying`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`appearance`,children:`Appearance`}),`\n`,_jsx(_components.p,{children:`The sheet renders in light, dark, or automatic appearance, following the appearance mode configured for your app in the Encore dashboard. Automatic is the default: the presentation window is left unspecified, so the sheet inherits your app’s interface style and switches with it, with no work on your side.`}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/publishers/ios/sdk-reference/presentation-result`,children:`PresentationResult`}),` describes everything `,_jsx(_components.code,{children:`show()`}),` can resolve to.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/publishers/ios/sdk-reference/outcomes`,children:`outcomes`}),` is the passive stream every resolution also lands on.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/publishers/ios/sdk-reference/is-claim-enabled`,children:`isClaimEnabled`}),` gates the claim CTA on the cards this presents.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"placement()","description":"Create and present Encore offers with a fluent API","href":"/publishers/ios/sdk-reference/placement"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Purpose","slug":"purpose","depth":2,"children":[]},{"title":"Signature","slug":"signature","depth":2,"children":[]},{"title":"Methods","slug":"methods","depth":2,"children":[]},{"title":"Use cases","slug":"use-cases","depth":2,"children":[]},{"title":"Usage Patterns","slug":"usage-patterns","depth":2,"children":[{"title":"Async/await (recommended)","slug":"async/await-recommended","depth":3,"children":[]},{"title":"Callback form","slug":"callback-form","depth":3,"children":[]},{"title":"Selecting a use case","slug":"selecting-a-use-case","depth":3,"children":[]},{"title":"Reward for trying","slug":"reward-for-trying","depth":3,"children":[]}]},{"title":"Appearance","slug":"appearance","depth":2,"children":[]},{"title":"Related","slug":"related","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"encore-5242061e","siteName":"Encore","title":"placement() - Encore","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-01T17:13:04.248Z","originalFileLocation":"publishers/ios/sdk-reference/placement.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create and present Encore offers with a fluent API\">\u003cmeta data-mint-head name=\"application-name\" content=\"Encore\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/encore-5242061e/xhPViPNw21djssdp/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/encore-5242061e/xhPViPNw21djssdp/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/encore-5242061e/xhPViPNw21djssdp/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/encore-5242061e/xhPViPNw21djssdp/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/encore-5242061e/xhPViPNw21djssdp/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/encore-5242061e/xhPViPNw21djssdp/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/encore-5242061e/xhPViPNw21djssdp/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/encore-5242061e/xhPViPNw21djssdp/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/encore-5242061e/xhPViPNw21djssdp/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"placement() - Encore\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create and present Encore offers with a fluent API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Encore\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.encorekit.com/publishers/ios/sdk-reference/placement\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://encore-5242061e.mintlify.site/_mintlify/api/og/v2?division=SDK+Reference\u0026amp;title=placement%28%29\u0026amp;description=Create+and+present+Encore+offers+with+a+fluent+API\u0026amp;theme=a8629d4b4cdc3312cab43c0f\u0026amp;signature=62dfad5646a5ee122bb35605ae6aeea2d3049d204ebfec8c5c29cd9b31db04c2\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"placement() - Encore\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create and present Encore offers with a fluent API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://encore-5242061e.mintlify.site/_mintlify/api/og/v2?division=SDK+Reference\u0026amp;title=placement%28%29\u0026amp;description=Create+and+present+Encore+offers+with+a+fluent+API\u0026amp;theme=a8629d4b4cdc3312cab43c0f\u0026amp;signature=62dfad5646a5ee122bb35605ae6aeea2d3049d204ebfec8c5c29cd9b31db04c2\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/encore-5242061e/xhPViPNw21djssdp/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Encore\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3B82F6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.encorekit.com/publishers/ios/sdk-reference/placement\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/publishers/ios/sdk-reference/placement.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.encorekit.com/#organization\",\"name\":\"Encore\",\"url\":\"https://docs.encorekit.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.encorekit.com#website\",\"name\":\"Encore\",\"url\":\"https://docs.encorekit.com\",\"publisher\":{\"@id\":\"https://docs.encorekit.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.encorekit.com/publishers/ios/sdk-reference/placement#webpage\",\"url\":\"https://docs.encorekit.com/publishers/ios/sdk-reference/placement\",\"name\":\"placement()\",\"description\":\"Create and present Encore offers with a fluent API\",\"dateModified\":\"2026-10-01T17:13:04.248Z\",\"isPartOf\":{\"@id\":\"https://docs.encorekit.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.encorekit.com/publishers/ios/sdk-reference/placement#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.encorekit.com/publishers/ios/sdk-reference/placement#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"iOS\",\"item\":\"https://docs.encorekit.com/publishers/ios/quickstart/install\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SDK Reference\",\"item\":\"https://docs.encorekit.com/publishers/ios/sdk-reference/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"placement()\",\"item\":\"https://docs.encorekit.com/publishers/ios/sdk-reference/placement\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.encorekit.com/publishers/ios/sdk-reference/placement#article\",\"headline\":\"placement()\",\"name\":\"placement()\",\"description\":\"Create and present Encore offers with a fluent API\",\"url\":\"https://docs.encorekit.com/publishers/ios/sdk-reference/placement\",\"mainEntityOfPage\":{\"@id\":\"https://docs.encorekit.com/publishers/ios/sdk-reference/placement#webpage\"},\"dateModified\":\"2026-10-01T17:13:04.248Z\",\"publisher\":{\"@id\":\"https://docs.encorekit.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.encorekit.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Encore\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Encore","nav":{"global":{"anchors":[{"anchor":"My Dashboard","icon":"gauge","href":"https://dashboard.encorekit.com"},{"anchor":"Support","icon":"envelope","href":"mailto:admin@encorekit.com"}]},"products":[{"product":"Publishers","icon":"code","tabs":[{"tab":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":""}]},{"tab":"SDKs","icon":"cubes","groups":[{"group":"iOS","pages":[{"group":"Quickstart","pages":[{"title":"Install the SDK","href":"/publishers/ios/quickstart/install"},{"title":"Configure the SDK","href":"/publishers/ios/quickstart/configure"},{"title":"User Management","href":"/publishers/ios/quickstart/user-management"},{"title":"Presenting Offers","href":"/publishers/ios/quickstart/present-offers"},{"title":"Configure Analytics","href":"/publishers/ios/quickstart/configure-analytics"}]},{"group":"Platform Integration","pages":[{"title":"App Store Subscription Product","href":"/publishers/ios/platform-setup/subscription-product"},{"title":"App Store Server Notifications","href":"/publishers/ios/platform-setup/server-notifications"},{"title":"Create a Promotional Offer","href":"/publishers/ios/platform-setup/create-promotional-offer"}]},{"group":"Integration Guides","pages":[{"title":"Integration Patterns","href":"/publishers/ios/guides/integration-patterns"},{"group":"Reduce Churn","pages":[{"title":"Add Subscription Product","href":"/publishers/ios/guides/add-subscription-product"}]},{"group":"3rd Party Subscription Managers","pages":[{"group":"Superwall","pages":[{"title":"Present Offers with Superwall","sidebarTitle":"Present Offers","href":"/publishers/ios/guides/managers/superwall/present-offers"},{"title":"Add Subscription Product with Superwall","sidebarTitle":"Add Subscription Product","href":"/publishers/ios/guides/managers/superwall/add-subscription-product"},{"title":"Configure Analytics with Superwall","sidebarTitle":"Configure Analytics","href":"/publishers/ios/guides/managers/superwall/configure-analytics"}]},{"group":"RevenueCat","pages":[{"title":"Present Offers with RevenueCat","sidebarTitle":"Present Offers","href":"/publishers/ios/guides/managers/revenuecat/present-offers"},{"title":"Add Subscription Product with RevenueCat","sidebarTitle":"Add Subscription Product","href":"/publishers/ios/guides/managers/revenuecat/add-subscription-product"},{"title":"Configure Analytics with RevenueCat","sidebarTitle":"Configure Analytics","href":"/publishers/ios/guides/managers/revenuecat/configure-analytics"}]},{"group":"Adapty","pages":[{"title":"Add Subscription Product with Adapty","sidebarTitle":"Add Subscription Product","href":"/publishers/ios/guides/managers/adapty/add-subscription-product"},{"title":"Configure Analytics with Adapty","sidebarTitle":"Configure Analytics","href":"/publishers/ios/guides/managers/adapty/configure-analytics"}]},{"group":"Qonversion","pages":[{"title":"Add Subscription Product with Qonversion","sidebarTitle":"Add Subscription Product","href":"/publishers/ios/guides/managers/qonversion/add-subscription-product"},{"title":"Configure Analytics with Qonversion","sidebarTitle":"Configure Analytics","href":"/publishers/ios/guides/managers/qonversion/configure-analytics"}]},{"title":"Using Multiple Managers","sidebarTitle":"Multiple Managers","href":"/publishers/ios/guides/managers/multiple-managers"}]}]},{"group":"Updating the SDK","pages":[{"title":"Routine updates","href":"/publishers/ios/guides/updating-sdk"},{"title":"Updating to 2.x","href":"/publishers/ios/guides/updating-to-2-x"}]},{"group":"SDK Reference","pages":[{"title":"Overview","href":"/publishers/ios/sdk-reference/overview"},{"title":"configure()","href":"/publishers/ios/sdk-reference/configure"},{"title":"identify()","href":"/publishers/ios/sdk-reference/identify"},{"title":"setUserAttributes()","href":"/publishers/ios/sdk-reference/set-user-attributes"},{"title":"setLanguage()","href":"/publishers/ios/sdk-reference/set-language"},{"title":"clearLanguage()","href":"/publishers/ios/sdk-reference/clear-language"},{"title":"reset()","href":"/publishers/ios/sdk-reference/reset"},{"title":"isActive()","href":"/publishers/ios/sdk-reference/is-active"},{"title":"isActivePublisher()","description":"Reactive entitlement state updates using Combine","href":"/publishers/ios/sdk-reference/is-active-publisher"},{"title":"placement()","href":"/publishers/ios/sdk-reference/placement"},{"title":"EncorePurchaseController","description":"The purchase controller your app registers so Encore offers purchase through your billing code","href":"/publishers/ios/sdk-reference/purchase-controller"},{"title":"outcomes","href":"/publishers/ios/sdk-reference/outcomes"},{"title":"isClaimEnabled","href":"/publishers/ios/sdk-reference/is-claim-enabled"},{"title":"revokeEntitlements()","href":"/publishers/ios/sdk-reference/revoke-entitlements"},{"title":"UserAttributes","href":"/publishers/ios/sdk-reference/user-attributes"},{"title":"PresentationResult","href":"/publishers/ios/sdk-reference/presentation-result"},{"title":"Entitlements","href":"/publishers/ios/sdk-reference/entitlements"},{"title":"EntitlementScope","href":"/publishers/ios/sdk-reference/entitlement-scope"},{"title":"DismissReason","href":"/publishers/ios/sdk-reference/dismiss-reason"},{"title":"Errors","href":"/publishers/ios/sdk-reference/errors"}]}]},{"group":"Android","pages":[{"group":"Quickstart","pages":[{"title":"Install the SDK","href":"/publishers/android/quickstart/install"},{"title":"Configure the SDK","href":"/publishers/android/quickstart/configure"},{"title":"User Management","href":"/publishers/android/quickstart/user-management"},{"title":"Presenting Offers","href":"/publishers/android/quickstart/present-offers"},{"title":"Configure Analytics","href":"/publishers/android/quickstart/configure-analytics"}]},{"group":"Platform Integration","pages":[{"title":"Google Play Subscription Product","href":"/publishers/android/platform-setup/subscription-product"},{"title":"Real-Time Developer Notifications","href":"/publishers/android/platform-setup/server-notifications"}]},{"group":"Integration Guides","pages":[{"title":"Integration Patterns","href":"/publishers/android/guides/integration-patterns"},{"group":"Reduce Churn","pages":[{"title":"Add Subscription Product","href":"/publishers/android/guides/add-subscription-product"}]}]},{"group":"Updating the SDK","pages":[{"title":"Routine updates","href":"/publishers/android/guides/updating-sdk"},{"title":"Updating to 2.x","href":"/publishers/android/guides/updating-to-2-x"}]},{"group":"SDK Reference","pages":[{"title":"Overview","href":"/publishers/android/sdk-reference/overview"},{"title":"configure()","href":"/publishers/android/sdk-reference/configure"},{"title":"identify()","href":"/publishers/android/sdk-reference/identify"},{"title":"setUserAttributes()","href":"/publishers/android/sdk-reference/set-user-attributes"},{"title":"setLanguage()","href":"/publishers/android/sdk-reference/set-language"},{"title":"clearLanguage()","href":"/publishers/android/sdk-reference/clear-language"},{"title":"reset()","href":"/publishers/android/sdk-reference/reset"},{"title":"EncorePurchaseController","href":"/publishers/android/sdk-reference/purchase-controller"},{"title":"placement()","href":"/publishers/android/sdk-reference/placement"},{"title":"PresentationResult","href":"/publishers/android/sdk-reference/presentation-result"},{"title":"DismissReason","href":"/publishers/android/sdk-reference/dismiss-reason"},{"title":"Encore.outcomes","href":"/publishers/android/sdk-reference/outcomes"},{"title":"UserAttributes","href":"/publishers/android/sdk-reference/user-attributes"},{"title":"EncoreError","href":"/publishers/android/sdk-reference/errors"}]}]},{"group":"Web","pages":[{"group":"Quickstart","pages":[{"title":"Install the SDK","href":"/publishers/web/quickstart/install"},{"title":"Configure the SDK","href":"/publishers/web/quickstart/configure"},{"title":"User Management","href":"/publishers/web/quickstart/user-management"},{"title":"Present Offers","href":"/publishers/web/quickstart/present-offers"},{"title":"Configure Analytics","href":"/publishers/web/quickstart/configure-analytics"}]},{"group":"Integration Guides","pages":[{"title":"Web Integration Patterns","href":"/publishers/web/guides/integration-patterns"},{"title":"Hosted Offer Page (No SDK)","sidebarTitle":"Hosted Offer Page","href":"/publishers/web/guides/hosted-offer-page"},{"group":"Frameworks","pages":[{"title":"React","href":"/publishers/web/frameworks/react"},{"title":"Vue","href":"/publishers/web/frameworks/vue"},{"title":"Svelte","href":"/publishers/web/frameworks/svelte"},{"title":"Angular","href":"/publishers/web/frameworks/angular"},{"title":"Vanilla JavaScript","href":"/publishers/web/frameworks/vanilla-js"}]},{"group":"Reward Users","pages":[{"title":"Post-Purchase Placements","href":"/publishers/web/guides/post-purchase-placements"}]},{"group":"Reduce Churn","pages":[{"title":"Reduce Churn at the Paywall","sidebarTitle":"At the Paywall","href":"/publishers/web/guides/intercept-paywall-abandonment"}]},{"group":"3rd Party Subscription Managers","pages":[{"title":"Using RevenueCat","sidebarTitle":"RevenueCat","href":"/publishers/web/guides/managers/revenuecat"}]},{"title":"Advanced UI","href":"/publishers/web/guides/advanced-ui"}]},{"group":"Updating the SDK","pages":[{"title":"Routine updates","href":"/publishers/web/guides/updating-sdk"},{"title":"Updating to 2.x","href":"/publishers/web/guides/updating-to-2-x"}]},{"group":"Concepts","pages":[{"title":"The Claim Flow","href":"/publishers/web/concepts/claim-flow"},{"title":"Sheet Variants","href":"/publishers/web/concepts/sheet-variants"}]},{"group":"SDK Reference","pages":[{"title":"Overview","href":"/publishers/web/sdk-reference/overview"},{"title":"configure()","href":"/publishers/web/sdk-reference/configure"},{"title":"identify()","href":"/publishers/web/sdk-reference/identify"},{"title":"setUserAttributes()","href":"/publishers/web/sdk-reference/set-user-attributes"},{"title":"setLanguage()","href":"/publishers/web/sdk-reference/set-language"},{"title":"clearLanguage()","href":"/publishers/web/sdk-reference/clear-language"},{"title":"reset()","href":"/publishers/web/sdk-reference/reset"},{"title":"show()","href":"/publishers/web/sdk-reference/show"},{"title":"redeem()","href":"/publishers/web/sdk-reference/redeem"},{"title":"placement()","href":"/publishers/web/sdk-reference/placement"},{"title":"isClaimEnabled","href":"/publishers/web/sdk-reference/is-claim-enabled"},{"title":"onStrictUnlockVerified()","href":"/publishers/web/sdk-reference/on-strict-unlock-verified"},{"title":"Error Handling","href":"/publishers/web/sdk-reference/errors"},{"title":"Webhook Ingestion","href":"/publishers/web/sdk-reference/webhook-ingestion"}]}]},{"group":"Bridges","pages":[{"group":"React Native","pages":[{"group":"Quickstart","pages":[{"title":"Install the SDK","href":"/publishers/react-native/quickstart/install"},{"title":"Configure the SDK","href":"/publishers/react-native/quickstart/configure"},{"title":"User Management","href":"/publishers/react-native/quickstart/user-management"},{"title":"Presenting Offers","href":"/publishers/react-native/quickstart/present-offers"}]},{"group":"Guides","pages":[{"title":"React Native Integration Patterns","href":"/publishers/react-native/guides/integration-patterns"},{"group":"Reduce Churn","pages":[{"title":"Add Subscription Product","href":"/publishers/react-native/guides/add-subscription-product"}]}]},{"group":"Updating the SDK","pages":[{"title":"Routine updates","href":"/publishers/react-native/guides/updating-sdk"},{"title":"Updating to 2.x","href":"/publishers/react-native/guides/updating-to-2-x"}]},{"group":"SDK Reference","pages":[{"title":"configure()","href":"/publishers/react-native/sdk-reference/configure"},{"title":"identify()","href":"/publishers/react-native/sdk-reference/identify"},{"title":"setUserAttributes()","href":"/publishers/react-native/sdk-reference/set-user-attributes"},{"title":"setLanguage()","href":"/publishers/react-native/sdk-reference/set-language"},{"title":"clearLanguage()","href":"/publishers/react-native/sdk-reference/clear-language"},{"title":"reset()","href":"/publishers/react-native/sdk-reference/reset"},{"title":"placement()","href":"/publishers/react-native/sdk-reference/placement"},{"title":"PurchaseController","href":"/publishers/react-native/sdk-reference/purchase-controller"},{"title":"onOutcome()","href":"/publishers/react-native/sdk-reference/outcomes"},{"title":"setClaimEnabled()","href":"/publishers/react-native/sdk-reference/set-claim-enabled"},{"title":"UserAttributes","href":"/publishers/react-native/sdk-reference/user-attributes"},{"title":"PresentationResult","href":"/publishers/react-native/sdk-reference/presentation-result"},{"title":"Errors","href":"/publishers/react-native/sdk-reference/errors"}]}]},{"group":"Flutter","pages":[{"group":"Quickstart","pages":[{"title":"Install the SDK","href":"/publishers/flutter/quickstart/install"},{"title":"Configure the SDK","href":"/publishers/flutter/quickstart/configure"},{"title":"User Management","href":"/publishers/flutter/quickstart/user-management"},{"title":"Presenting Offers","href":"/publishers/flutter/quickstart/present-offers"}]},{"group":"Guides","pages":[{"title":"Flutter Integration Patterns","href":"/publishers/flutter/guides/integration-patterns"},{"group":"Reduce Churn","pages":[{"title":"Add Subscription Product","href":"/publishers/flutter/guides/add-subscription-product"}]}]},{"group":"Updating the SDK","pages":[{"title":"Routine updates","href":"/publishers/flutter/guides/updating-sdk"},{"title":"Updating to 2.x","href":"/publishers/flutter/guides/updating-to-2-x"}]},{"group":"SDK Reference","pages":[{"title":"Overview","href":"/publishers/flutter/sdk-reference/overview"},{"title":"configure()","href":"/publishers/flutter/sdk-reference/configure"},{"title":"identify()","href":"/publishers/flutter/sdk-reference/identify"},{"title":"setUserAttributes()","href":"/publishers/flutter/sdk-reference/set-user-attributes"},{"title":"setLanguage()","href":"/publishers/flutter/sdk-reference/set-language"},{"title":"clearLanguage()","href":"/publishers/flutter/sdk-reference/clear-language"},{"title":"reset()","href":"/publishers/flutter/sdk-reference/reset"},{"title":"placement()","href":"/publishers/flutter/sdk-reference/placement"},{"title":"EncorePurchaseController","href":"/publishers/flutter/sdk-reference/purchase-controller"},{"title":"outcomes","href":"/publishers/flutter/sdk-reference/outcomes"},{"title":"setClaimEnabled()","href":"/publishers/flutter/sdk-reference/set-claim-enabled"},{"title":"EncoreUserAttributes","href":"/publishers/flutter/sdk-reference/user-attributes"},{"title":"EncorePresentationResult","href":"/publishers/flutter/sdk-reference/presentation-result"},{"title":"EncoreDismissReason","href":"/publishers/flutter/sdk-reference/dismiss-reason"},{"title":"Errors","href":"/publishers/flutter/sdk-reference/errors"}]}]},{"group":"Unity","pages":[{"group":"Quickstart","pages":[{"title":"Install the SDK","href":"/publishers/unity/quickstart/install"},{"title":"Configure the SDK","href":"/publishers/unity/quickstart/configure"},{"title":"User Management","href":"/publishers/unity/quickstart/user-management"},{"title":"Presenting Offers","href":"/publishers/unity/quickstart/present-offers"}]},{"group":"Guides","pages":[{"title":"Build Compatibility","href":"/publishers/unity/guides/build-compatibility"}]},{"group":"SDK Reference","pages":[{"title":"Overview","href":"/publishers/unity/sdk-reference/overview"},{"title":"Configure()","href":"/publishers/unity/sdk-reference/configure"},{"title":"IEncorePurchaseController","href":"/publishers/unity/sdk-reference/purchase-controller"},{"title":"Identify()","href":"/publishers/unity/sdk-reference/identify"},{"title":"SetUserAttributes()","href":"/publishers/unity/sdk-reference/set-user-attributes"},{"title":"SetLanguage()","href":"/publishers/unity/sdk-reference/set-language"},{"title":"ClearLanguage()","href":"/publishers/unity/sdk-reference/clear-language"},{"title":"Reset()","href":"/publishers/unity/sdk-reference/reset"},{"title":"Placement()","href":"/publishers/unity/sdk-reference/placement"},{"title":"PresentationResult","href":"/publishers/unity/sdk-reference/presentation-result"},{"title":"Outcomes","href":"/publishers/unity/sdk-reference/outcomes"},{"title":"IsClaimEnabled","href":"/publishers/unity/sdk-reference/is-claim-enabled"},{"title":"IsActive()","href":"/publishers/unity/sdk-reference/is-active"},{"title":"IsActivePublisher()","href":"/publishers/unity/sdk-reference/is-active-publisher"},{"title":"Entitlement","href":"/publishers/unity/sdk-reference/entitlements"},{"title":"LinkPurchase()","href":"/publishers/unity/sdk-reference/link-purchase"},{"title":"CurrentEntitlement()","href":"/publishers/unity/sdk-reference/current-entitlement"},{"title":"RevokeEntitlements()","href":"/publishers/unity/sdk-reference/revoke-entitlements"},{"title":"ClearOfferCache()","href":"/publishers/unity/sdk-reference/clear-offer-cache"},{"title":"UserAttributes","href":"/publishers/unity/sdk-reference/user-attributes"},{"title":"AppearanceConfig","href":"/publishers/unity/sdk-reference/appearance-config"},{"title":"GiftsButton","href":"/publishers/unity/sdk-reference/gifts-button"},{"title":"ClaimReminder","href":"/publishers/unity/sdk-reference/claim-reminder"},{"title":"EncoreTrigger","href":"/publishers/unity/sdk-reference/encore-trigger"}]}]}]}]},{"tab":"Server API","icon":"server","pages":[{"title":"Server API","href":"/publishers/offers-api/guides/receive-completion-events"}]}]},{"product":"Advertisers","icon":"bullhorn","pages":[{"title":"Advertisers","href":"/advertisers/integration"}]}]},"basePath":"","title":"placement() - Encore","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":[],"chunks":[]}