Non-renewing subscriptions: Purchasing multiple times

I am implementing monthly subscriptions to my service using non-renewing subscriptions. When the users buys a subscription, I extend their account's

active_until
date by the number of months subscribed.


In testing this, I'm seeing that sometimes the App-Store does not allow the user to repurchase the item, and instead shows a dialog saying:


"This In-App Purchase has already been bought. It will be restored for free"


Then proceeds to restore the purchase, thus, not allowing the user to extend their subscription.


From what I understand, and from the In-App Purchase programming guide, handling expiry with non-renewing purchases is left to the developer. Also a user should be able to buy the item multiple times according to this:


https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Products.html#//apple_ref/doc/uid/TP40008267-CH2-SW4


However, that's not what I am seeing in my tests. Is this working the way it should, or is it a bug with the App-Store? Maybe there's a time limit within which the user can't repurchase the same item?

if your IAP is actually a non-renewing subscription then this was a bug in the sandbox. Non-renewing subscriptions cannot be "restored". The alert should be something like "You have already purchased this subscription. Do you want to renew or extend your subscription?"

Ok I finally fgured out what was going on. I had previously purchased that item, but in testing had not call `SKPaymentQueue.default.finishTransaction(t)` on that. So apparently, untile the transaction is finished, users won't be able to purchase it again... Which makes sense.


After I saw this, I also noticed that StoreKit doesn't call the restore handler in this case, which would be ideal cos it's supposed to handled exactly cases like this.

Non-renewing subscriptions: Purchasing multiple times
 
 
Q