4

I have implemented auto-renewable subscriptions in my app. All works ok. The only thing is that method public func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) is not being called after auto-renewal occurs as it should according to docs to inform me that subscription was renewed. It is called only when I call SKPaymentQueue.default().restoreCompletedTransactions()

I know that it auto-renews only 5 times and than I have to create new sandbox user and I tried it few times.

In my AppDelegate I do call SKPaymentQueue.default().add(self) method.

Any ideas?

Wojtek
  • 1,006
  • 11
  • 30

2 Answers2

4

After a subscription is successfully renewed, StoreKit adds a transaction for the renewal to the transaction queue. Your app checks the transaction queue on launch and handles the renewal the same way as any other transaction. Note that if your app is already running when the subscription renews, the transaction observer is not called; your app finds out about the renewal the next time the app is launched.

Source In-App Purchase Programming Guide: Working with Subscriptions

Wojciech Nagrodzki
  • 2,788
  • 15
  • 13
0

What transactionState auto renewed transaction have, when public func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) is called? .purchased?

Karina
  • 5
  • 3