Share PaywallPromoOfferCache between main and exit offer paywalls#6180
Open
facumenzella wants to merge 5 commits intomainfrom
Open
Share PaywallPromoOfferCache between main and exit offer paywalls#6180facumenzella wants to merge 5 commits intomainfrom
facumenzella wants to merge 5 commits intomainfrom
Conversation
…t offer paywalls The exit offer paywall was creating a new PaywallPromoOfferCache instance, causing eligibility to be computed asynchronously. If a user purchased before the computation completed, the promotional offer ID wouldn't be included. This fix shares the same cache instance between the main paywall and exit offer: - Add promoOfferCache property to PaywallViewConfiguration - Update PaywallsV2View to accept an optional external cache - Pass shared cache through SwiftUI modifiers (PresentingPaywallModifier, PresentingPaywallBindingModifier) - Pass shared cache in UIKit path (PaywallViewController for hybrids) Now when the exit offer appears, it reuses the pre-populated cache from the main paywall, and promotional offers are immediately available for purchase. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
📸 Snapshot Test242 unchanged
🛸 Powered by Emerge Tools |
JZDesign
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PaywallPromoOfferCacheinstance, causing eligibility to be computed asynchronouslyChanges
promoOfferCacheproperty toPaywallViewConfigurationPaywallsV2Viewto accept an optional external cache (creates new one if not provided)PresentingPaywallModifier,PresentingPaywallBindingModifier)PaywallViewControllerfor hybrid SDKs)init(content:)for exit offer creation to pass the shared cacheHow It Works
PaywallPromoOfferCacheand computes eligibility.taskstill callscomputeEligibility()(for any new products)get()returns immediately with the cached promotional offerTest plan
presentPaywallIfNeededPaywallViewController🤖 Generated with Claude Code