Align iOS paywall preview mocks with web/dashboard catalog#7064
Draft
JayShortway wants to merge 2 commits into
Draft
Align iOS paywall preview mocks with web/dashboard catalog#7064JayShortway wants to merge 2 commits into
JayShortway wants to merge 2 commits into
Conversation
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>
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>
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
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.jsoncontain 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
OfferingsFactorylooks them up by compoundproduct:planidentifier (e.g.com.revenuecat.annual_product:p1y, sincepackages.jsoncarries billing plan identifiers). That mismatch can silently drop subscription packages.Description
Reworks
PaywallPreviewResourcesLoader(test-only) to build the preview products withTestStoreProduct:$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/dashboardproduct.store_product_nameand the Android preview parser.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_discountbadge 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_screenshotslane in CI; please verify the recorded iOS screenshots there.Checklist
purchases-androidand hybrids