Utilizing RevenueCat and checking the customers subscription standing.
If Subscribed or not will decide the view proven in a fullScreenCover
Solely as the decision to test standing is async I’ve to name with await and wrap in a Process{}
which isn’t attainable inside a fullScreenCover
.
The best way to name a async
operate in a fullScreenCover
.fullScreenCover(isPresented: $subscriptionIsExpanded){
Process {
if await StoreManager.isPremiumSubscriber() {
ActiveSubscription()
}
else{
PaywallView(displayCloseButton: true)
}
}
}
Process{}
provides error: Static technique 'buildExpression' requires that 'Process<(), By no means>' conform to 'View'