extension Product {
var isEligableForPurchase: Bool {
get async {
guard
type == .autoRenewable,
subscription?.introductoryOffer?.type == .introductory
else {
return true
}
switch await latestTransaction {
case .verified: return false
default: return true
}
}
}
}
I used this
Topic:
App & System Services
SubTopic:
StoreKit
Tags: