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

Add shouldDisplayDismissButton #606

Merged
merged 8 commits into from
Dec 26, 2023
Merged

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Dec 22, 2023

Add shouldDisplayDismissButton to launchPaywall so we can add this parameter to the hybrids

@vegaro vegaro requested a review from a team December 22, 2023 10:20
@vegaro vegaro added the pr:feat A new feature label Dec 22, 2023
@@ -26,13 +26,15 @@ import UIKit
}

@objc
public func presentPaywall() {
public func presentPaywall(
displayCloseButton: Bool = false
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we should make it nullable instead? So we can use the default defined in purchases-ios

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, not sure if that would work in objc, since nullable booleans didn't work well if I remember correctly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried and I get

Method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C

I can maybe do two functions?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's an option yeah... Maybe that would be better to try to avoid having the default in multiple places, but I'm ok keeping it like this as well.

@@ -26,13 +26,15 @@ import UIKit
}

@objc
public func presentPaywall() {
public func presentPaywall(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add this to the api tests?

@tonidero
Copy link
Contributor

I would change the label to RevenueCatUI

@vegaro vegaro added pr:RevenueCatUI and removed pr:feat A new feature labels Dec 22, 2023
@vegaro vegaro requested a review from tonidero December 22, 2023 13:22
@vegaro vegaro merged commit 850e7a6 into paywalls Dec 26, 2023
9 checks passed
@vegaro vegaro deleted the add-shouldDisplayDismissButton branch December 26, 2023 10:51
vegaro added a commit that referenced this pull request Dec 26, 2023
@vegaro vegaro mentioned this pull request Dec 26, 2023
vegaro added a commit that referenced this pull request Dec 26, 2023
### RevenueCatUI
* Add offering parameter for launching paywalls (#612) via Cesar de la
Vega (@vegaro)
* Add shouldDisplayDismissButton (#606) via Cesar de la Vega (@vegaro)
### Dependency Updates
* Android 7.3.0 => 7.3.1
* iOS 4.31.5 => 4.31.6
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.

3 participants