Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Paywalls V2] Added V1 fallback paywall into Paywall V2 error logic #4666

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

joshdholtz
Copy link
Member

@joshdholtz joshdholtz commented Jan 15, 2025

Motivation

Show V1 fallback paywall for when we get errors in Paywalls V2

Description

Using Paywalls V1 fallpack paywalls (for now) when big bad errors occur:

  • Decoder issues
  • View model validation issues
Example
Simulator Screenshot - iPhone 16 - 2025-01-14 at 20 10 52

@joshdholtz joshdholtz requested review from a team January 15, 2025 02:30
Comment on lines +259 to +274
let paywall: PaywallData = .createDefault(with: offering.availablePackages,
locale: self.locale)
let paywallView = LoadedOfferingPaywallView(
offering: offering,
activelySubscribedProductIdentifiers: activelySubscribedProductIdentifiers,
paywall: paywall,
template: PaywallData.defaultTemplate,
mode: self.mode,
fonts: fonts,
displayCloseButton: self.displayCloseButton,
introEligibility: checker,
purchaseHandler: purchaseHandler,
locale: self.locale,
showZeroDecimalPlacePrices: showZeroDecimalPlacePrices
)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels gross but we'll replace this eventually with a custom paywalls v2 fallback

Copy link
Member

@JayShortway JayShortway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a question.

@joshdholtz joshdholtz merged commit 4413503 into main Jan 15, 2025
10 checks passed
@joshdholtz joshdholtz deleted the paywalls-v2/fallback-paywall branch January 15, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants