-
Notifications
You must be signed in to change notification settings - Fork 404
Open
Description
- I have updated Purchases SDK to the latest version
- I have read the Contribution Guidelines
- I have searched the Community
- I have read docs.revenuecat.com
- I have searched for existing Github issues
Describe the bug
In the following code snippet the print line will not be called. I have seen many issues here on GitHub and in the community regarding this issue with not much news on it. Some of them have replies from developers saying it was fixed in 5.17.0, but this is not true for me and for others I have seen.
RevenueCatUI.PaywallView(offering: offering, displayCloseButton: true)
.onRestoreCompleted { _ in
print("onRestoreCompleted")
}
- Environment
- Platform: iOS
- SDK version: 5.22.1
- StoreKit version:
- StoreKit 1 (default on versions <5.0.0. Can be enabled in versions >=5.0.0 with
.with(storeKitVersion: .storeKit1)) - StoreKit 2 (default on versions >=5.0.0)
- StoreKit 1 (default on versions <5.0.0. Can be enabled in versions >=5.0.0 with
- OS version: iOS 18.4
- Xcode version: 16.3
- Device and/or simulator:
- Device
- Simulator
- Environment:
- Sandbox
- TestFlight
- Production
- How widespread is the issue. Percentage of devices affected.
- Debug logs that reproduce the issue. Complete logs with
Purchases.logLevel = .verbosewill help us debug this issue.
Logs here
- Steps to reproduce, with a description of expected vs. actual behavior
Actual
- Add
.onRestoreCompletedto aRevenueCatUI.PaywallView - Click restore purchase button
- Nothing happens
Expected
- Add
.onRestoreCompletedto aRevenueCatUI.PaywallView - Click restore purchase button
- The closure in onRestoreCompleted is called
- Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
Related:
- https://community.revenuecat.com/sdks-51/paywall-callbacks-never-called-5881
- https://community.revenuecat.com/sdks-51/onpurchasecompleted-handler-is-not-called-on-recent-version-of-revenuecat-ios-purchase5-18-6032
- https://community.revenuecat.com/sdks-51/onpurchasecompleted-not-being-called-in-swift-sdk-5880
-https://community.revenuecat.com/sdks%2D51/restore%2Dcompletion%2Dhandlers%2Dnot%2Dfiring%2Din%2Dpresentpaywallifneeded%2D4674 - Clicking the Restore Purchase button in Paywalls doesn't get the user information #3511
- Additional context
Add any other context about the problem here.
jmtiimo, dfmuir, savyobrenner, gevorgyanvahagn and mdoganaltinbastnmendes