Transaction list for IAPs in StoreKit2 always shows two transaction after renewal. Why?

I have an app with one subscription to buy. Buying works fine and renewal seems to work fine, too.

I am observing transaction for this IAPin the background. To understand what is happening in the background I add print debug statements and I see that after each renewal two nearly identical transactions exist. This is the function which generates the task to watch for transaction happening in the background:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>private func observeTransactionUpdates() -> Task<Void, Never> {
Task(priority: .background) { [unowned self] in
for await verificationResult in Transaction.updates {
await self.updatePurchasedProducts()
if case .verified(let transaction) = verificationResult {
print("Verified")
print(transaction)
await transaction.finish() // Ensure finishing all transactions
} else if case .unverified(let transaction, _) = verificationResult {
print("Unverified")
print(transaction)
await transaction.finish() // Even finish unverified transactions
}
}
}
}
</code>
<code>private func observeTransactionUpdates() -> Task<Void, Never> { Task(priority: .background) { [unowned self] in for await verificationResult in Transaction.updates { await self.updatePurchasedProducts() if case .verified(let transaction) = verificationResult { print("Verified") print(transaction) await transaction.finish() // Ensure finishing all transactions } else if case .unverified(let transaction, _) = verificationResult { print("Unverified") print(transaction) await transaction.finish() // Even finish unverified transactions } } } } </code>
private func observeTransactionUpdates() -> Task<Void, Never> {
    Task(priority: .background) { [unowned self] in
        for await verificationResult in Transaction.updates {
            await self.updatePurchasedProducts()
            if case .verified(let transaction) = verificationResult {
                print("Verified")
                print(transaction)
                await transaction.finish() // Ensure finishing all transactions
            } else if case .unverified(let transaction, _) = verificationResult {
                print("Unverified")
                print(transaction)
                await transaction.finish() // Even finish unverified transactions
            }
        }
    }
}

This is the debug output happening all 3 minutes(sandbox) after renewal:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code> Verified
{
"bundleId" : "...app",
"currency" : "EUR",
"deviceVerification" : "...qZZf",
"deviceVerificationNonce" : "...df9",
"environment" : "Sandbox",
"expiresDate" : 1718878102000,
"inAppOwnershipType" : "PURCHASED",
"originalPurchaseDate" : 1718536890000,
"originalTransactionId" : "...1810",
"price" : 2990,
"productId" : "....premium.monthly",
"purchaseDate" : 1718877922000,
"quantity" : 1,
"signedDate" : 1718877887210,
"storefront" : "DEU",
"storefrontId" : "...443",
"subscriptionGroupIdentifier" : "...060",
"transactionId" : "...5774",
"transactionReason" : "RENEWAL",
"type" : "Auto-Renewable Subscription",
"webOrderLineItemId" : "...9876"
}
Verified
{
"bundleId" : "...app",
"currency" : "EUR",
"deviceVerification" : "...ocx",
"deviceVerificationNonce" : "...3bf",
"environment" : "Sandbox",
"expiresDate" : 1718878102000,
"inAppOwnershipType" : "PURCHASED",
"originalPurchaseDate" : 1718536890000,
"originalTransactionId" : "...1810",
"price" : 2990,
"productId" : "....premium.monthly",
"purchaseDate" : 1718877922000,
"quantity" : 1,
"signedDate" : 1718877888930,
"storefront" : "DEU",
"storefrontId" : "...443",
"subscriptionGroupIdentifier" : "...060",
"transactionId" : "...5774",
"transactionReason" : "RENEWAL",
"type" : "Auto-Renewable Subscription",
"webOrderLineItemId" : "...9876"
}
</code>
<code> Verified { "bundleId" : "...app", "currency" : "EUR", "deviceVerification" : "...qZZf", "deviceVerificationNonce" : "...df9", "environment" : "Sandbox", "expiresDate" : 1718878102000, "inAppOwnershipType" : "PURCHASED", "originalPurchaseDate" : 1718536890000, "originalTransactionId" : "...1810", "price" : 2990, "productId" : "....premium.monthly", "purchaseDate" : 1718877922000, "quantity" : 1, "signedDate" : 1718877887210, "storefront" : "DEU", "storefrontId" : "...443", "subscriptionGroupIdentifier" : "...060", "transactionId" : "...5774", "transactionReason" : "RENEWAL", "type" : "Auto-Renewable Subscription", "webOrderLineItemId" : "...9876" } Verified { "bundleId" : "...app", "currency" : "EUR", "deviceVerification" : "...ocx", "deviceVerificationNonce" : "...3bf", "environment" : "Sandbox", "expiresDate" : 1718878102000, "inAppOwnershipType" : "PURCHASED", "originalPurchaseDate" : 1718536890000, "originalTransactionId" : "...1810", "price" : 2990, "productId" : "....premium.monthly", "purchaseDate" : 1718877922000, "quantity" : 1, "signedDate" : 1718877888930, "storefront" : "DEU", "storefrontId" : "...443", "subscriptionGroupIdentifier" : "...060", "transactionId" : "...5774", "transactionReason" : "RENEWAL", "type" : "Auto-Renewable Subscription", "webOrderLineItemId" : "...9876" } </code>
 Verified
 {
   "bundleId" : "...app",
   "currency" : "EUR",
   "deviceVerification" : "...qZZf",
   "deviceVerificationNonce" : "...df9",
   "environment" : "Sandbox",
   "expiresDate" : 1718878102000,
   "inAppOwnershipType" : "PURCHASED",
   "originalPurchaseDate" : 1718536890000,
   "originalTransactionId" : "...1810",
   "price" : 2990,
   "productId" : "....premium.monthly",
   "purchaseDate" : 1718877922000,
   "quantity" : 1,
   "signedDate" : 1718877887210,
   "storefront" : "DEU",
   "storefrontId" : "...443",
   "subscriptionGroupIdentifier" : "...060",
   "transactionId" : "...5774",
   "transactionReason" : "RENEWAL",
   "type" : "Auto-Renewable Subscription",
   "webOrderLineItemId" : "...9876"
 }
 
 Verified
 {
   "bundleId" : "...app",
   "currency" : "EUR",
   "deviceVerification" : "...ocx",
   "deviceVerificationNonce" : "...3bf",
   "environment" : "Sandbox",
   "expiresDate" : 1718878102000,
   "inAppOwnershipType" : "PURCHASED",
   "originalPurchaseDate" : 1718536890000,
   "originalTransactionId" : "...1810",
   "price" : 2990,
   "productId" : "....premium.monthly",
   "purchaseDate" : 1718877922000,
   "quantity" : 1,
   "signedDate" : 1718877888930,
   "storefront" : "DEU",
   "storefrontId" : "...443",
   "subscriptionGroupIdentifier" : "...060",
   "transactionId" : "...5774",
   "transactionReason" : "RENEWAL",
   "type" : "Auto-Renewable Subscription",
   "webOrderLineItemId" : "...9876"
 }

After a renewal of a purchased product I would expect one transaction with a valid expiration date happening in the background but not two transactions with the same expiration date. Why is that so?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật