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] Allow for app specific component overrides #4652

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

joshdholtz
Copy link
Member

@joshdholtz joshdholtz commented Jan 12, 2025

Motivation

There are occasions where we will want components to have overridden values PER app

Example:

  • Different deep link schemes/urls
  • Different terms/privacy policies (iOS vs Android)

Description

Added a new optional app override property that will get dynamically set by the offferings response API for the app that requested it

⚠️ THE BACKEND IS NOT IMPLEMENTED YET

Copy link

emerge-tools bot commented Jan 12, 2025

1 build increased size

Name Version Download Change Install Change Approval
Paywalls
com.revenuecat.PaywallsTester
1.0 (1) 11.1 MB ⬆️ 143.6 kB (1.32%) 41.1 MB ⬆️ 511.7 kB (1.27%) N/A

Paywalls 1.0 (1)
com.revenuecat.PaywallsTester

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

Total install size change: ⬆️ 511.7 kB (1.27%)
Total download size change: ⬆️ 143.6 kB (1.32%)

Largest size changes

Item Install Size Change
RevenueCat.OfferingsFactory.OfferingsFactory ⬆️ 20.2 kB
Code Signature ⬆️ 12.6 kB
RevenueCatUI.ImageComponentViewModel.ImageComponentViewModel ⬆️ 8.2 kB
RevenueCatUI.TextComponentViewModel.TextComponentViewModel ⬆️ 6.6 kB
RevenueCatUI.StackComponentViewModel.StackComponentViewModel ⬆️ 5.5 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

@joshdholtz joshdholtz requested review from a team January 12, 2025 13:39
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.

It's not entirely clear to me why the SDK needs to know about this? Why would the SDK ever receive values meant for a different app? I think handling this 100% on the backend has many benefits (saving bandwidth, seamless updates/bugfixes). Could you elaborate why we need this in the SDK? 🙏

@joshdholtz joshdholtz force-pushed the paywalls-v2/app-specific-overrides branch from dac92dd to 0e0aa51 Compare January 13, 2025 11:35
@joshdholtz
Copy link
Member Author

It's not entirely clear to me why the SDK needs to know about this? Why would the SDK ever receive values meant for a different app? I think handling this 100% on the backend has many benefits (saving bandwidth, seamless updates/bugfixes). Could you elaborate why we need this in the SDK? 🙏

@JayShortway Ahhhhh... I see what you are saying!

So my thought was...

  • Backend would give the SDK only the override it needed for its platform
  • App would see that and then do its things

I thought this way because I really didn't want the backend to have to go a modify/merge value IN the component but... I see the way you were thinking now 🤔

I'll go do a quick POC in the backend where this PR isn't needed at all 😇

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