Comments (7)
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
from purchases-ios.
Relevant MR that added automatic dismissal of PaywallViewController
on purchase event: #3517
from purchases-ios.
Thanks for the detailed report!
You are correct. Unfortunately there is no trivial way of doing this because a successful restore does not imply that the user has unlocked something. From our docs:
When using presentPaywallIfNeeded
we can determine if the condition to display the paywall is no longer met and dismiss it automatically on restore: https://github.com/RevenueCat/purchases-ios/blob/4.33.0/RevenueCatUI/View%2BPresentPaywall.swift#L200-L202
Therefore this likely has to be done manually from outside the SDK.
Calling controller.dismiss(animated) when receiving didFinishRestoringWith WILL dismiss the view controller, but the "Success" alert will NOT be shown
Can you share the code you're using for that?
from purchases-ios.
Thanks for the quick reply, appreciate the explanation. I attempted an MR for this yesterday and also learned that it is not trivial.
I am using UIKit
to present the PaywallViewController
. Calling dismiss on the controller when receiving didFinishRestoringWith
will skip showing the UIAlertViewController
that is shown after success of a restore.
func paywallViewController(_ controller: PaywallViewController,
didFinishRestoringWith customerInfo: CustomerInfo) {
controller.dismiss(animated: true)
}
from purchases-ios.
Thank you! I just changed how this delegation works so that .onRestoreCompleted
and paywallViewController(_: didFinishRestoringWith:)
are only called after the "Purchases restored" dialog disappears #3620 :)
from purchases-ios.
Awesome. Thank you so much @NachoSoto!
from purchases-ios.
This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.
from purchases-ios.
Related Issues (20)
- NonSubscriptionTransaction.transactionIdentifier Does not match StoreTransaction.identifier HOT 3
- Paywall shows in English despite iPhone being set to German HOT 8
- Control PaywallView dismiss HOT 6
- Paywall bug for visionOS, Template 4, not enough room for "Monthly" split over two lines HOT 1
- RevenueCat randomly can't fetch offerings for ONE of my devices (iPadOS 17.4 beta) HOT 9
- ErrorCode description should be localized HOT 3
- Invalid reason on xcprivacy report file: Privacy Accessed API Types USERDEFAULT HOT 3
- purchases-ios stuck fetching in Xcode HOT 4
- SPM install takes forever HOT 17
- /v1/receipts api returns status_code 529 HOT 7
- Paywall language changes on every app re-install HOT 4
- "can't find package" error. HOT 4
- Add support for the native macOS platform to the RevenueCat Paywalls HOT 2
- Way to test Promotions in-app purchases from Store HOT 1
- Unable to fetch offering on real device when using Storekit file HOT 4
- Weird state of checkTrialOrIntroDiscountEligibility HOT 6
- Bug: Writing Keys out of container HOT 4
- macOS App hanging for at least 2000 ms because of check for macOS app running on the main thread. HOT 2
- CustomerInfo needs subscriptions. HOT 4
- Subtle Paywall localization issue HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purchases-ios.