2 years ago

#61452

test-img

Dmitry

StoreKit2 Transaction.updates does not emit transactions on subscription renew

I'm listening for transaction updates during the whole lifetime of the app as described in the Transaction.updates:

func startObservingTransactions() -> Task<Void, Error> {
    return Task.detached {
        for await result in Transaction.updates {
            print("Transaction update")

            if case .verified(let transaction) = result {
                await transaction.finish()

                ...
            }
        }
    }
}

The Transaction.updates never emits transactions when a subscription renews. Also, I don't receive unfinished transactions on the app launch. Refunding a transaction, however, produces an update as expected.

I experience the same behavior on Simulator and real devices using Xcode, Sandbox, and TestFlight environments.

Is it even supposed to notify about the subscription renewals or should I just observe the transaction queue as usual?

I'm using Xcode 13.2.1, iOS 15.2.

ios

swift

storekit

0 Answers

Your Answer

Accepted video resources