StoreKit 2 • updateListenerTask never called (Ask To Buy context for example)

Hello,

I'm currently adding StoreKit 2 into my app. I've watched the WWDC21 session (Meet SK2) and downloaded the sample SKDemo app. When I want to test the Ask To Buy flow, it does not work: I see the sheet on the device, I see the alert and tap on the "Ask" button. In Xcode, I then approve the transaction but the func listenForTransactions() -> Task<Void, Error> is never called. I'm testing the app in Debug mode, on a real device and on a simulator (using the Products.storekit local configuration file).

What's wrong?

Thanks, Axel

Version 13.2 beta 2 (13C5081f) iOS 15.2 (19C5044b)

func listenForTransactions() -> Task<Void, Error> {
        return Task.detached {
            for await result in Transaction.updates {
                do {
                    let transaction = try self.checkVerified(result)
                    await self.updatePurchasedIdentifiers(transaction)
                    await transaction.finish()
                } catch {
                    print("Transaction failed verification")
                }
            }
        }
    }

It's working normally with Xcode Version 13.1 (13A1030d) and iOS 15.0 (simulator). I think it's a bug, I'll fill a report for that.

I am running into this same issue with version 13.2. An approved transaction from Xcode sandbox never fires the listenForTransactions function. Any updates?

Looks like it might be fixed on iOS 15.4:

  • Fixed:  updates now emits unfinished transactions when iterating for the first time. (85294525)
  • Fixed: When using StoreKit Testing in Xcode,  updates now emits all updated transactions. (85877689)
StoreKit 2 • updateListenerTask never called (Ask To Buy context for example)
 
 
Q