Paywalls: add updateWithDisplayCloseButton to PaywallViewController#3708
Merged
Conversation
772cce6 to
dc8d10f
Compare
tonidero
approved these changes
Feb 29, 2024
This was referenced Mar 4, 2024
joshdholtz
added a commit
that referenced
this pull request
Mar 5, 2024
**This is an automatic release.** ### New Features * Paywalls: add `updateWithDisplayCloseButton` to `PaywallViewController` (#3708) via Cesar de la Vega (@vegaro) * New `syncAttributesAndOfferingsIfNeeded` method (#3709) via Burdock (@lburdock) * Add targeting to `PresentedOfferingContext` (#3730) via Josh Holtz (@joshdholtz) * Add `currentOffering(forPlacement: String)` to `Offerings` (#3707) via Guido Torres (@guido732) * New `Package.presentedOfferingContext` (#3712) via Josh Holtz (@joshdholtz) ### Bugfixes * Mark methods with StaticString for appUserID as deprecated (#3739) via Mark Villacampa (@MarkVillacampa) ### Other Changes * [EXTERNAL] Spelling typo fix to comment (#3713) via @vdeaugustine (#3740) via Mark Villacampa (@MarkVillacampa) --------- Co-authored-by: Josh Holtz <me@joshholtz.com>
vegaro
added a commit
to RevenueCat/react-native-purchases
that referenced
this pull request
Mar 14, 2024
Depends on: - RevenueCat/purchases-ios#3708 - RevenueCat/purchases-ios#3738 - RevenueCat/purchases-hybrid-common#746 With 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 `onDismiss` callback from getting called when using `PaywallView` after 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 the `onDismiss` would be called, so the `PaywallView` could 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 a `PaywallView` the 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 that `PaywallView` in iOS used to do `self.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.
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.
Add function to be used from the hybrids (RevenueCat/react-native-purchases#913)