Skip to content

Align iOS paywall preview mocks with web/dashboard catalog#7064

Draft
JayShortway wants to merge 2 commits into
mainfrom
cursor/align-ios-paywall-preview-mocks-e89f
Draft

Align iOS paywall preview mocks with web/dashboard catalog#7064
JayShortway wants to merge 2 commits into
mainfrom
cursor/align-ios-paywall-preview-mocks-e89f

Conversation

@JayShortway

@JayShortway JayShortway commented Jun 22, 2026

Copy link
Copy Markdown
Member

Motivation

One of four coordinated PRs (iOS, Android, web SDK, dashboard) to reconcile the products/prices/offers shown on the cross-platform paywall rendering-validation screenshots. The screenshots diverge because each platform mocks the missing product data (the shared offerings.json/packages.json contain no prices or offers) from its own hard-coded table. iOS was the biggest outlier: every product was mocked at a flat $1.99 with no intro offers.

Additionally, the loader keyed products only by base identifier, while OfferingsFactory looks them up by compound product:plan identifier (e.g. com.revenuecat.annual_product:p1y, since packages.json carries billing plan identifiers). That mismatch can silently drop subscription packages.

Description

Reworks PaywallPreviewResourcesLoader (test-only) to build the preview products with TestStoreProduct:

  • Canonical prices/periods matching the web + dashboard preview tables (which are identical and treated as the source of truth): weekly $2.99, monthly $9.99, 2-month $17.99, 3-month $24.99, 6-month $39.99, annual $69.99, lifetime $119.99.
  • A single $1.99 / 1-week introductory offer on each subscription, so products are intro-offer eligible and offer text/UI render (matching the web/dashboard "intro offer present" state and the Android trial/intro phases).
  • "Pro Access" as the localized product title, matching the web/dashboard product.store_product_name and the Android preview parser.
  • The products map is keyed by both base and compound (product:plan) identifiers so packages resolve regardless of billing plan ids.

Only the test-only loader under Tests/RevenueCatUITests/ is changed; no SDK source is touched.

Known residual: the relative_discount badge is a hard-coded "19%" string on web/dashboard but computed from prices on iOS/Android, so that percentage may still differ across platforms.

Testing

I could not build/run the screenshot tests in this environment (no Xcode/SwiftLint available). The screenshots are regenerated by the record_paywall_screenshots lane in CI; please verify the recorded iOS screenshots there.

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-android and hybrids
Open in Web Open in Cursor 

The validation-screenshot loader mocked every product at a flat $1.99 with no
intro offers, and keyed products only by base identifier, so subscription packages
(which carry billing plan identifiers in packages.json) resolved by compound
'product:plan' id could be dropped.

Build the preview products with TestStoreProduct using the canonical web/dashboard
prices and subscription periods (weekly $2.99 … annual $69.99, lifetime $119.99),
attach a single $1.99 / 1-week introductory offer to each subscription so offers are
intro-eligible and shown, and key the products map by both base and compound
identifiers so packages resolve regardless of billing plan ids. Test-only loader; no
SDK source changed.

Co-authored-by: joop <joop@revenuecat.com>
@RevenueCat-Danger-Bot

Copy link
Copy Markdown
1 Error
🚫 Label the PR using one of the change type labels. If you are not sure which label to use, choose pr:other.
Label Description
pr:feat A new feature. Use along with pr:breaking to force a major release.
pr:fix A bug fix. Use along with pr:force_minor to force a minor release.
pr:other Other changes. Catch-all for anything that doesn't fit the above categories. Releases that only contain this label will not be released. Use along with pr:force_patch, or pr:force_minor to force a patch or minor release.
pr:RevenueCatUI Use along any other tag to mark a PR that only contains RevenueCatUI changes
pr:next_release Preparing a new release
pr:dependencies Updating a dependency
pr:phc_dependencies Updating purchases-hybrid-common dependency
pr:changelog_ignore The PR will not be included in the changelog. This label doesn't determine the type of bump of the version and must be combined with pr:feat, pr:fix or pr:other.

Generated by 🚫 Danger

Match the product.store_product_name value used by the web/dashboard preview tables
and the Android preview parser, so the rendering-validation screenshots show a
consistent product name across platforms.

Co-authored-by: joop <joop@revenuecat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants