Paywalls: add displayCloseButton to PaywallViewController#3391
Conversation
See #3359. This brings support for that parameter to the `UIKit` type.
5f350e4 to
e9e5229
Compare
| } | ||
|
|
||
| ProminentButton(title: "Present PaywallViewController") { | ||
| self.presentPaywallViewController() |
There was a problem hiding this comment.
This allows us to test it internally as well.
| } | ||
|
|
||
| return .init(rootView: AnyView(view)) | ||
| return .init(rootView: view) |
There was a problem hiding this comment.
Simplified this to avoid using AnyView too 🎉
| UIApplication.shared | ||
| .currentWindowScene? | ||
| .keyWindow? | ||
| .rootViewController? | ||
| .present(paywall, animated: true) |
There was a problem hiding this comment.
This isn't great (ignoring nils), but it's just a test app.
There was a problem hiding this comment.
I guess we could log something if it's nil? Just so it's not confusing in case something goes wrong.
| /// - Parameter offering: The `Offering` containing the desired `PaywallData` to display. | ||
| /// `Offerings.current` will be used by default. | ||
| /// - Parameter displayCloseButton: Set this to `true` to automatically include a close button. | ||
| @objc |
There was a problem hiding this comment.
Added this to make sure it's available since we don't have a RevenueCatUI Obj-C API tester.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3391 +/- ##
=======================================
Coverage 86.04% 86.04%
=======================================
Files 237 237
Lines 17187 17187
=======================================
+ Hits 14788 14789 +1
+ Misses 2399 2398 -1 ☔ View full report in Codecov by Sentry. |
| UIApplication.shared | ||
| .currentWindowScene? | ||
| .keyWindow? | ||
| .rootViewController? | ||
| .present(paywall, animated: true) |
There was a problem hiding this comment.
I guess we could log something if it's nil? Just so it's not confusing in case something goes wrong.
**This is an automatic release.** ### RevenueCatUI * `Paywalls`: add `displayCloseButton` to `PaywallViewController` (#3391) via NachoSoto (@NachoSoto) * `Paywalls`: fix Turkish translation (#3389) via Dogancan Mavideniz (@mavideniz) * `Paywalls`: fix Turkish translation (#3388) via iremkaraoglu (@iremkaraoglu) ### Other Changes * `RevenueCatUI`: added support to other deployment targets (#3392) via NachoSoto (@NachoSoto)
See #3359.
This brings support for that parameter to the
UIKittype.