-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent paywall PurchaseHandler from being cleared on rerender (#4035)
### Motivation Fixes #4034 `PurchaseHandler` was being cleared/reset when a paywall was being rendered (ex: if an overlay was applied to it) ### Description - Restores `PurchaseHandler` back to being a `@StateObject` from #3187 - `checkForConfigurationConsistency()` has a few changes - Takes a `PurchaseHandler` as a parameter so it doesn't try to access the `StateObject` - This was fixes the purple Xcode warning of being access wrongly by it being a `StateObject` again - Removes `mutating` keyword and returns an `NSError?` which it now sets in the constructor ### Demo #### Using RevenueCat https://github.com/RevenueCat/purchases-ios/assets/401294/7e6430ca-6243-49ad-b7c0-8a90d90894f8 #### Using MyApp https://github.com/RevenueCat/purchases-ios/assets/401294/829f12c3-a11a-4952-883c-7ae7addd9c1d
- Loading branch information
1 parent
45d2cb7
commit dbcfe0c
Showing
3 changed files
with
20 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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