I am having an issue enabling a simple button after a user subscribes using the presentPaywallIfNeeded(requiredEntitlementIdentifier: "Premium") sheet. I disable this button until a user purchases a subscription. Now this works when i click off the current view and come back via tab bar. It's when the sheet dismisses to the current view where i am not able to enable the button. I’ve tried a number of things so far:
- creating a isSubscribed flag which works but not for the current view until i leave and come back to that view.
- adding various things to OnAppear for the current view
- Maybe creating a Binding?
Any ideas would be appreciated. The functionality comes across as being very buggy when i can't enable UI components after a user purchases a subscription and the sheet dismisses.
- Swiftui
- Xcode 16.2