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 verify standing is async I’ve to name with await and wrap in a Activity{}
which isn’t potential inside a fullScreenCover
.
Easy methods to name a async
perform in a fullScreenCover
.fullScreenCover(isPresented: $subscriptionIsExpanded){
Activity {
if await StoreManager.isPremiumSubscriber() {
ActiveSubscription()
}
else{
PaywallView(displayCloseButton: true)
}
}
}
Activity{}
offers error: Static technique 'buildExpression' requires that 'Activity<(), By no means>' conform to 'View'