Hi,
In my SwiftUI app, I manage the app state with enums, and the paywall only presents to the user when I set the value of uiState to .displayPaywall.
When this happens, the following code runs:
1case .displayPaywall(let uuid):2 PaywallView {3 viewModel.retry()4 }5 .presentPaywallIfNeeded(6 requiredEntitlementIdentifier: "premium") { _ in7 viewModel.fetchLandmarkInfoIfAllowed()8 }9 }
And this is the PaywallView. The idea being that if the user dismisses the Paywall by clicking the X button, I show a simple message and a button that should supposedly trigger the Paywall view again:
1struct PaywallView: View {2 let onRetry: () -> Void3 var body: some View {4 VStack {5 Text("Max free daily limit reached. Upgrade to Premium for unlimited use.")6 .multilineTextAlignment(.center)7 .padding()8 Button("Retry") {9 onRetry()10 }11 }12 }13}
The issue I am facing now is that since RevenueCat SDK takes care of all the logic of whether Paywall should be presented or not, I can’t find a way to trigger the Paywall again with the click of a button.
Once the retry() is fired, I just want the Paywall to come back up. By current logic, the user needs to restart the app to see the Paywall again, which is not ideal at all.

