Reputation: 63
I'm testing a new app on my device, and today, I started integrating the StoreKit for In-App Purchases.
The problem is that EVERY TIME I launch the app, it asks me for my sandbox account password. Here following, you'll find some details about the problem.
StoreKit starts doing it's stuff in a view which is NOT the rootView, so I excluded that I'm casting something wrong programmatically...
So, what I did AFTER?
The problem is still there. Keep in mind that the password asked is for [email protected] (the very first test account!)
Upvotes: 4
Views: 2093
Reputation: 1997
Stopped the app, integrated a button "Restore purchases". Unfortunately, I forgot to add "finishTransaction" at completition (not sure if this could be the problem)
That is indeed the problem!
Store Kit will always ask you to re-authenticate if there are transactions left on the queue. To get rid of those transactions, just call:
for transaction in SKPaymentQueue.defaultQueue().transactions {
SKPaymentQueue.defaultQueue().finishTransaction(transaction)
}
Upvotes: 6