-
Notifications
You must be signed in to change notification settings - Fork 310
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
: extracted PaywallViewConfiguration
#3586
Conversation
The number of parameters was already very large. This refactor combines the different values into its own type. This is also a preliminary refactor to be able to configure a paywall with an offering identifier instead of an offering, which will be used by the hybrid SDKs.
var mode: PaywallViewMode = .default | ||
var fonts: PaywallFontProvider = DefaultPaywallFontProvider() | ||
var displayCloseButton: Bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value for these is now in a single place instead of being duplicated in several places.
Depends on #3586. This will be used by the hybrid SDKs to be able to load paywalls with an offering identifier.
Depends on #3586. This will be used by the hybrid SDKs to be able to load paywalls with an offering identifier.
Depends on #3586. This will be used by the hybrid SDKs to be able to load paywalls with an offering identifier.
|
||
/// Parameters needed to configure a ``PaywallView``. | ||
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) | ||
struct PaywallViewConfiguration { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In android, this would be similar to PaywallOptions
, which is public and it's how developers can customize most things for the paywall. We used the builder pattern there, but I'm not sure if that's so common in swift.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we could think about exposing this (and only the public types). We can do that in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just left a comment but I think this PR looks good
Depends on #3586. This will be used by the hybrid SDKs to be able to load paywalls with an offering identifier.
**This is an automatic release.** ### RevenueCatUI * `PaywallViewController`: new initializer with `Offering` identifier (#3587) via NachoSoto (@NachoSoto) * `Paywalls`: improve template 5 layout for long product names (#3589) via NachoSoto (@NachoSoto) ### Other Changes * `Paywalls`: extracted `PaywallViewConfiguration` (#3586) via NachoSoto (@NachoSoto) * `CircleCI`: avoid installing `Xcodes` when not needed (#3585) via NachoSoto (@NachoSoto) * `CircleCI`: change all jobs to M1 (#3140) via NachoSoto (@NachoSoto) --------- Co-authored-by: NachoSoto <ignaciosoto90@gmail.com> Co-authored-by: NachoSoto <NachoSoto@users.noreply.github.com>
The number of parameters was already very large. This refactor combines the different values into its own type.
This is also a preliminary refactor to be able to configure a paywall with an offering identifier instead of an offering, which will be used by the hybrid SDKs.