Issue: there are two subscriptions of the same group that come simultaneously with every renewal during the debugging of
for await result in Transaction.currentEntitlements {
guard case .verified(let transaction) = result else {
continue
}
if transaction.revocationDate == nil {
self.purchasedSubscriptionsIDs.insert(transaction.productID)
} else {
self.purchasedSubscriptionsIDs.remove(transaction.productID)
}
await transaction.finish()
}
steps:
- chose some non top price subscription
- change plan to some lower price subscription
result – they are all within Transaction.currentEntitlements, the transaction.expirationDate of expired plans are lower than current date. Possibly accepting the very one that has had the highest expirationDate might be the solution but nonetheless…
circumstances:
- it happens only on a device, simulator is ok
- selected renewal every minute
- transaction manager shows all correctly: first higher price, then it appears expired and the lower one appears as purchased