This is the message I get when I press on my restore purchases button. Here is the code I have for restoring the purchases......Can someone tell me if Im doing something wrong. Thank you! BTW If you need more info or code please let me know.
Ignoring restoreCompletedTransactionsWithApplicationUsername: because already restoring transactions
func RestorePurchases() {
if SKPaymentQueue.canMakePayments() {
SKPaymentQueue.defaultQueue().restoreCompletedTransactions()
} else {
println("Can't make purchases")
}
}
func paymentQueueRestoreCompletedTransactionsFinished(queue: SKPaymentQueue!) {
var purchasedItemIDS = []
for transaction in queue.transactions {
var t: SKPaymentTransaction = transaction as! SKPaymentTransaction
let prodID = t.payment.productIdentifier as String
switch prodID {
case "unlockLevelTwo":
println("restoreleveltwo")
unlockLevelTwoPlease()
case "unlockLevelThree":
println("restorelevelthree")
unlockLevelThreePlease()
default:
println("IAP not setup")
}
}
}
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
var touch: UITouch = touches.first as! UITouch
var location = touch.locationInNode(self)
var node = self.nodeAtPoint(location)
if node.name == "restore" {
runAction(menuAudioPlayer)
RestorePurchases()
}
You're never calling
finishTransaction:
with the transaction once it's restored, so it remains in the payment queue.From the documentation for this method: