Skip to main content
This section documents the Encore iOS SDK’s complete public API in a consistent format with clean parameter tables, comprehensive usage examples, and best practices.
Looking for integration guides?
  • New to Encore? Start with the Getting Started Guide for portal-guided setup
  • Step-by-step integration: See the iOS Quickstart for detailed installation and configuration instructions
  • Advanced setups: This reference section is ideal for looking up specific methods, parameters, and advanced usage patterns

Core Methods

configure()

Initialize the SDK with your public API key and optional UI configuration

identify()

Associate your user ID with Encore for cross-device tracking

setUserAttributes()

Set structured attributes for targeting and analytics

reset()

Clear user identification and cached entitlements on logout

Presenting Offers

placement()

Fluent API for presenting offers with optional callbacks or async/await

isActive()

Check if an entitlement is currently active for the user

isActivePublisher()

Reactive Combine publisher for entitlement state changes

Testing & Development

revokeEntitlements()

Admin method to revoke all entitlements for testing offer flows end-to-end

Types & Configuration

UserAttributes

Structured user attributes for targeting and personalization

Entitlements

Types of rewards granted when users accept offers

PresentationResult

Possible outcomes when presenting an offer

NotGrantedReason

Reasons why an entitlement was not granted

Error Handling

Errors

Errors that can occur when using the SDK

Basic Integration

Passive Offer (fire-and-forget)

Branch on the PresentationResult returned by try await show():
The fluent .onGranted { } / .onNotGranted { } builder callbacks are deprecated. Prefer branching on the PresentationResult from try await show(), or register global onPurchaseRequest / onPassthrough handlers.
For reactive state, subscribe with isActivePublisher to keep premium UI in sync as provisional grants are verified or revoked.