Show DefaultPaywall warning view in UI preview mode#6973
Merged
ajpallares merged 4 commits intoJun 12, 2026
Conversation
DefaultPaywallView configuration warnings stay DEBUG-only unless DangerousSettings.uiPreviewMode is enabled, so the RevenueCat app can surface them in release UI preview builds. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…e' of github.com:RevenueCat/purchases-ios into pallares/show-default-paywall-warning-in-ui-preview-mode
rickvdl
approved these changes
Jun 11, 2026
rickvdl
left a comment
Member
There was a problem hiding this comment.
This makes total sense to me, thanks for adding!
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.
Motivation
DefaultPaywallViewshows configuration warnings only in DEBUG. The RevenueCat mobile app's UI preview mode runs in release configuration, so those warnings never appear for developer, and they may help them debug the issue more easily. This change surfaces them in UI preview mode.Description
@_spi(Internal) Purchases.isUIPreviewModeand threads it throughPaywallPurchasesType/PurchaseHandler.shouldShowWarningreturns true in UI preview mode when a warning exists, even outside DEBUG.Note
Low Risk
UI-only gating for developer warnings with no purchase or auth changes; release behavior unchanged unless UI preview mode is explicitly configured.
Overview
Default paywall configuration warnings now appear in UI preview mode on release builds, not only in DEBUG.
The PR adds
@_spi(Internal) Purchases.isUIPreviewMode(fromDangerousSettings.uiPreviewMode) and threads it throughPaywallPurchasesType,PurchaseHandler, and test/stub implementations (MockPurchases,NotConfiguredPurchases,LoadingPaywallPurchases).DefaultPaywallView.shouldShowWarningstill shows warnings whenever one exists in DEBUG; in release it only shows when both a warning is present andhandler.isUIPreviewModeis true, so production users do not see developer-facing warnings.Reviewed by Cursor Bugbot for commit 2b261a6. Bugbot is set up for automated code reviews on this repo. Configure here.