Purchasely iOS SDK 6.0.0
6.0.0 is a major release with breaking changes. It modernizes SDK initialization and the paywall display surface, replaces the global action interceptor with a granular per-action API, adds Swift Package Manager support, and lands cross-platform parity and reliability fixes. Most read-only call sites keep compiling; anything that configures the SDK or drives paywall display will need updates.
π Before upgrading, read the full Migration Guide. Every breaking change below links to a numbered section there with before/after code.
Highlights
π§ Fluent initialization builder
Purchasely.start(withAPIKey:β¦) is replaced by a fluent Purchasely.apiKey(β¦)β¦start() chain with async/await and completion-handler variants. .full to .observer β add .runningMode(.full) explicitly if you validate transactions.
π― Per-action interceptor API
setPaywallActionsInterceptor (one global handler, ambiguous boolean) is replaced by per-action Purchasely.interceptAction(.login) { β¦ } returning an explicit PLYInterceptResult (.success / .failed / .notHandled), with async/await support and richer PLYInterceptorInfo context.
π§± Consolidated paywall display around PLYPresentationBuilder
A single fluent builder now owns presentation, display, and dismissal end-to-end. It replaces the fetchPresentation(β¦) family, the UIViewController- and SwiftUI-view-returning factories, and showController(β¦). Supports content id, color and header-button overrides, and lifecycle callbacks (onPresented, onCloseRequested, onDismissed).
π¦ Enriched dismiss outcome
PLYPresentationBuilder.onDismissed and the renamed setDefaultPresentationDismissHandler now deliver a PLYPresentationOutcome carrying purchaseResult, plan, presentation, a new PLYCloseReason (.button / .interactiveDismiss / .programmatic / .none), and a reserved error field.
π Transition sizing (height / width / dismissible)
PLYTransition (formerly PLYDisplayMode) gains additive sizing for drawer/popin β fixed pixels or percentage, plus a dismissible flag that blocks ambient dismiss when false. PLYDimension is now public so you can build sized transitions in code.
π Direct SwiftUI access
PLYPresentation.swiftUIView gives SwiftUI consumers a paywall View directly off the preloaded presentation, replacing the old controller.PresentationView indirection.
Breaking changes
Full details and before/after code in the Migration Guide.
Initialization & configuration
- Β§1 β
Purchasely.start(withAPIKey:β¦)removed β use thePurchasely.apiKey(β¦)builder. Default running mode is now.observer(was.full). - Pre-
startclass funcs (setEnvironment,setThemeMode, etc.) deprecated (removed in v7).
Action interceptors
- Β§2 β
setPaywallActionsInterceptor()removed βPurchasely.interceptAction(). - Β§3 β
PLYPresentationInforemoved βPLYInterceptorInfo. - Β§4 β
paywallActionsInterceptorparameter removed fromstart(). - Β§5 β
PLYPaywallActionsInterceptortypealias removed.
Presentation & display
- Β§6 β
PLYPresentationis now a protocol (was a class); reads/methods compile unchanged. - Β§7 β
PLYPresentationViewController.PresentationViewremoved. - Β§8/Β§9 β public delegate signatures and
PLYInterceptorInfo.presentationtakeany PLYPresentation. - Β§10 β
Purchasely.fetchPresentation(β¦)removed βPLYPresentationBuilder. - Β§11 β
closeDisplayedPresentation()removed βcloseAllScreens(). - Β§12 β UIViewController-returning factories removed β
PLYPresentationBuilder. - Β§13 β
Purchasely.display(β¦)simplified to a one-liner (transition:param; vendor-ID/completion/async overloads removed). - Β§14 β
setDefaultPresentationResultHandlerrenamed tosetDefaultPresentationDismissHandler, now deliversPLYPresentationOutcome. - Β§15 β SwiftUI embedded-view factories removed β
PLYPresentationBuilder+presentation.swiftUIView. - Β§21 β
showController(_:type:from:)andPLYUIControllerTyperemoved. - Β§22 β legacy "My Subscriptions" screen removed, along with
PLYEvent.subscriptionsListViewedand.cancellationReasonPublished.
Renames (no compat aliases)
- Β§17 β
PLYDisplayModeβPLYTransition,PLYDisplayModeTypeβPLYTransitionType,PLYPresentation.idβ.screenId,PLYPresentation.displayModeβ.transition,PLYPresentationBuilder.onCloseβ.onCloseRequested,clientPresentationOpened(with:)βclientPresentationDisplayed(with:).
Deeplinks & attributes
- Β§16 β
ply/products/*andply/plans/*deeplinks removed β useply/presentations/<id>orply/placements/<id>. - Β§18 β
readyToOpenDeeplink(_:)βallowDeeplink(_:);isDeeplinkHandled(deeplink:)βhandleDeeplink(_:). - Β§19 β
allowCampaignsnow defaults totrue(wasfalse) and waits for configuration before displaying. - Β§20 β
PLYAttribute.oneSignalPlayerIdremoved βoneSignalExternalId/oneSignalUserId. Backend targeting rules keyed ononesignal_player_idmust be repointed toonesignal_external_id.
Internal improvements (no code changes required)
- AsyncStream action executor: Fixed an issue with double-completion actions from a single tap.
- Unified display architecture: all presentations display through a single
PLYWindowcode path, fixing flow-state and missed-event edge cases. - Flow state corruption fix: no more orphaned SDK windows or corrupted flow state after certain dismiss sequences.
- StoreKit: removed the FB22760273 commitment-price workaround (fixed by Apple); billing-plan-scoped offers for iOS 26.4 monthly commitment.
- Numerous layout, header-button, tvOS focus, and iPad flow-close fixes.