What problem does it solve?
This guide helps you integrate Recurly Engage so prompts display correctly in a SwiftUI iOS or tvOS app, including initialization, triggering, and handling user outcomes.
Core Features & Use Cases
- Initialize Engage once: Configure
PromptManager.initPrompt early in app startup so prompt handling is ready before navigation and prompt triggers occur.
- Single shared overlay pattern: Use one root-level
.promptOverlay with a shared PromptOverlayTrigger observable to avoid stacking multiple overlays and ensure only one prompt shows at a time.
- Trigger prompts from screens, buttons, and zones: Use
.screen(...), .button(...), and PromptInline(zone:) to match configured trigger strings and zone IDs in Recurly Engage.
- Optional manual prompt resolution & push/IAP wiring: Fetch triggerable prompts with
getTriggerablePrompts, handle results in onEvent, and integrate push notifications and StoreKit 2 in-app purchases where applicable.
Quick Start
Follow the Redflix end-to-end pattern by initializing PromptManager at startup, creating a shared PromptOverlayTrigger, attaching a single .promptOverlay at the root view, and then setting the trigger from .task, button actions, or PromptInline zones.