Add displayCloseButton option to PaywallView#913
Merged
Conversation
d7df537 to
e2d8010
Compare
Member
Author
|
This works in Android, but in iOS the |
69fc32c to
de18be2
Compare
de18be2 to
ab308ab
Compare
vegaro
added a commit
to RevenueCat/purchases-ios
that referenced
this pull request
Feb 29, 2024
…r` (#3708) Add function to be used from the hybrids (RevenueCat/react-native-purchases#913)
ab308ab to
45978cf
Compare
vegaro
added a commit
to RevenueCat/purchases-ios
that referenced
this pull request
Mar 13, 2024
…nRequestedDismissal` (#3738) Please read RevenueCat/react-native-purchases#913
vegaro
added a commit
to RevenueCat/purchases-hybrid-common
that referenced
this pull request
Mar 14, 2024
45978cf to
f32bdbd
Compare
f32bdbd to
1b6b059
Compare
vegaro
pushed a commit
that referenced
this pull request
Mar 14, 2024
**This is an automatic release.** ### New Features * Add `displayCloseButton` option to `PaywallView` (#913) via Cesar de la Vega (@vegaro) ### Dependency Updates * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 10.2.0 (#940) via RevenueCat Git Bot (@RCGitBot) * [Android 7.7.2](https://github.com/RevenueCat/purchases-android/releases/tag/7.7.2) * [iOS 4.39.0](https://github.com/RevenueCat/purchases-ios/releases/tag/4.39.0) * [iOS 4.38.1](https://github.com/RevenueCat/purchases-ios/releases/tag/4.38.1) * [iOS 4.38.0](https://github.com/RevenueCat/purchases-ios/releases/tag/4.38.0) * [AUTOMATIC BUMP] Updates purchases-hybrid-common to 10.1.0 (#938) via RevenueCat Git Bot (@RCGitBot) * [Android 7.7.2](https://github.com/RevenueCat/purchases-android/releases/tag/7.7.2) * [iOS 4.39.0](https://github.com/RevenueCat/purchases-ios/releases/tag/4.39.0) * [iOS 4.38.1](https://github.com/RevenueCat/purchases-ios/releases/tag/4.38.1) * [iOS 4.38.0](https://github.com/RevenueCat/purchases-ios/releases/tag/4.38.0) ### Other Changes * Make hotfixes not deploy with the latest tag nor update latest docs (#937) via Toni Rico (@tonidero) * Update RELEASING.md (#936) via Cesar de la Vega (@vegaro) * Add 6.7.2 to changelog (#935) via Cesar de la Vega (@vegaro) --------- Co-authored-by: RevenueCat CI <dev+ci@revenuecat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on:
updateWithDisplayCloseButtontoPaywallViewControllerpurchases-ios#3708PaywallView.onRequestedDismissalmodifier and option to passdismissRequestedHandlertoPaywallViewControllerpurchases-ios#3738paywallViewControllerRequestedDismissalpurchases-hybrid-common#746With this PR, there's a change in functionality in the way the dismissal of the paywall works in iOS.
In iOS I noticed there was a bug that prevented the
onDismisscallback from getting called when usingPaywallViewafter dismissal of the paywall, and I also noticed that the paywall was getting automatically dismissed. In Android, I noticed the behavior was different, and the paywall wouldn't close by itself and theonDismisswould be called, so thePaywallViewcould be dismissed by the developer.Taking into account the way React Native views work, I think the developer should have the responsability of not showing the paywall (dimissing it). So I consider Android implemntation's the correct one.
Those PRs (RevenueCat/purchases-ios#3738 and RevenueCat/purchases-hybrid-common#746) make some changes in the way iOS behaves, so if the view is created from
PaywallProxy, which is what React Native uses to create aPaywallViewthe view wouldn't close itself after the close button is pressed (or a successful purchase happens). It's a change in behavior, but I think it's a actually something we overlooked in iOS implementation's. Also, take into account thatPaywallViewin iOS used to doself.dismiss, which I believe would only work if the PaywallView in React Native is being presented using something like Navigator, where the dismiss event would bubble up and close the container controller.