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] Use V1 default paywall when footers are used with V2 paywalls #4667

Merged
merged 6 commits into from
Jan 15, 2025

Conversation

joshdholtz
Copy link
Member

Motivation

We aren't planning to support footer paywalls in Paywalls V2

Description

Uses the Paywalls V1 footer with the default paywalls when a footer is requested with a Paywalls V2 paywall

Screen.Recording.2025-01-14.at.9.08.25.PM.mov

Copy link

emerge-tools bot commented Jan 15, 2025

1 build increased size

Name Version Download Change Install Change Approval
Paywalls
com.revenuecat.PaywallsTester
1.0 (1) 10.6 MB ⬆️ 74.5 kB (0.71%) 39.9 MB ⬆️ 292.8 kB (0.74%) N/A

Paywalls 1.0 (1)
com.revenuecat.PaywallsTester

⚖️ Compare build
📦 Install build
⏱️ Analyze build performance

Total install size change: ⬆️ 292.8 kB (0.74%)
Total download size change: ⬆️ 74.5 kB (0.71%)

Largest size changes

Item Install Size Change
Code Signature ⬆️ 7.4 kB
DYLD.String Table ⬆️ 6.2 kB
DYLD.Exports ⬆️ 1.2 kB
📝 RevenueCatUI.PaywallsV2View.PaywallsV2View ⬆️ 796 B
Other ⬆️ 277.1 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

Just a comment, but probably not enough time to act on it now. LGTM!

// For fallback view or footer
let paywall: PaywallData = .createDefault(with: offering.availablePackages,
locale: self.locale)
let paywallView = LoadedOfferingPaywallView(
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm do we have to build the V1 paywallView before checking if it's actually needed? I guess we would need to validate the data before displaying it which might be quite a refactor... So I'm ok with this for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

@tonidero Just updated this if you want to have another look again! I moved the creation the view to inside PaywallsV2View by passing an enum with data (either data for the LoadedOfferingPaywallView for production or AnyView for tests)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah nice! Yeah I think that's an improvement! I guess we do need to create the data for the default paywall before, but that's already a big improvement 👍

@joshdholtz joshdholtz force-pushed the paywalls-v2/use-default-v1-paywall-for-v2-footers branch from 9e50ba3 to 289fc8d Compare January 15, 2025 16:09
@joshdholtz joshdholtz merged commit 6f82e59 into main Jan 15, 2025
10 checks passed
@joshdholtz joshdholtz deleted the paywalls-v2/use-default-v1-paywall-for-v2-footers branch January 15, 2025 16:28
tonidero added a commit to RevenueCat/purchases-android that referenced this pull request Feb 3, 2025
… modes in a Components paywall (#2106)

### Description
Until now, if trying to present a components paywall as a footer, it
would display the paywall mostly full screen with some indeterminate
behavior.

After this, if the developer tries to present a paywall v2 as a
footer/condensed footer, we will fallback to the original paywall
fallback paywall, which uses template 2 right now.

Android equivalent of
RevenueCat/purchases-ios#4667

---------

Co-authored-by: JayShortway <29483617+JayShortway@users.noreply.github.com>
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