Problem: there are two subscriptions of the identical group that come concurrently with each renewal in the course of the debugging of
for await lead to Transaction.currentEntitlements {
guard case .verified(let transaction) = end result else {
proceed
}
if transaction.revocationDate == nil {
self.purchasedSubscriptionsIDs.insert(transaction.productID)
} else {
self.purchasedSubscriptionsIDs.take away(transaction.productID)
}
await transaction.end()
}
steps:
- selected some non lowest worth subscription
- change plan to some cheaper price subscription
end result – they’re all inside Transaction.currentEntitlements, the transaction.expirationDate of expired plans are decrease than present date. Presumably accepting the very one which has had the best expirationDate is perhaps the answer however nonetheless…
circumstances:
- it occurs solely on a tool, simulator is okay
- chosen renewal each minute
- transaction supervisor reveals all accurately: first increased worth, then it seems expired and the decrease one seems as bought