[EDIT: Please ignore. Will delete in a second]
Transaction.currentEntitlements is returning the complete history of transactions on a subscription product.
I have a program with an In-App Purchase for a monthly subscription. I am testing with a local StoreKit file in Xcode. I configured the StoreKit test file to update every minute.
When the program starts, I retrieve the current transactions from StoreKit to see if there is an active subscription.
for await verificationResult in Transaction.currentEntitlements {
guard case .verified(let transaction) = verificationResult else {
continue
}
// update status for subscriptions
This morning's testing is showing transactions for all transactions, both current and past.
The current subscription renewal is sent plus all the past renewals that have expired.
I thought in my previous testing that only one transaction (i.e., the latest/current) was sent per Product ID.
Is this (all subscription transactions) the expected behavior, or should I file a bug report?
Example debug output from Transaction.currentEntitlements loop (top transaction is the current one, but past expired ones are provided too; "DEBUG CURRENT ----" separates individual transactions):
DEBUG CURRENT: getCurrentEntitlements BEGIN
DEBUG CURRENT ----
DEBUG CURRENT: for product pro.monthly
DEBUG CURRENT: Verified Reason: Renewal
DEBUG CURRENT: Ownership: Purchased
DEBUG CURRENT: Purchases: is good
DEBUG CURRENT: signed date: 2026-03-26 17:37:12 +0000
DEBUG CURRENT: purchase date: 2026-03-26 17:36:24 +0000
DEBUG CURRENT: environment: Environment(rawValue: "Xcode")
DEBUG CURRENT: store front: Storefront(countryCode: "USA", id: "143441", localeStorage: en_US (fixed en_US))
DEBUG CURRENT ----
DEBUG CURRENT: for product pro.monthly
DEBUG CURRENT: Verified Reason: Renewal
DEBUG CURRENT: Ownership: Purchased
DEBUG CURRENT: Expired 2026-03-26 17:36:24 +0000
DEBUG CURRENT: signed date: 2026-03-26 17:35:25 +0000
DEBUG CURRENT: purchase date: 2026-03-26 17:35:24 +0000
DEBUG CURRENT: environment: Environment(rawValue: "Xcode")
DEBUG CURRENT: store front: Storefront(countryCode: "USA", id: "143441", localeStorage: en_US (fixed en_US))
DEBUG CURRENT ----
DEBUG CURRENT: for product pro.monthly
DEBUG CURRENT: Verified Reason: Renewal
DEBUG CURRENT: Ownership: Purchased
DEBUG CURRENT: Expired 2026-03-26 17:35:24 +0000
DEBUG CURRENT: signed date: 2026-03-26 17:34:25 +0000
DEBUG CURRENT: purchase date: 2026-03-26 17:34:24 +0000
DEBUG CURRENT: environment: Environment(rawValue: "Xcode")
DEBUG CURRENT: store front: Storefront(countryCode: "USA", id: "143441", localeStorage: en_US (fixed en_US))