Hi Everyone,
We recently implemented in app purchases on our app and I am experiencing some strange behavior. Using a sandbox user credentials I am able to purchase a non consumable product perfectly fine. However every time I try to restore that purchase, I get the following error :
Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo=0x170464b40 {NSLocalizedDescription=Cannot connect to iTunes Store}.
Here is how I initiate a restore :
@IBAction func restorepurchasesnow(sender: AnyObject) {
if transactionInProgress {
return
}
SKPaymentQueue.defaultQueue().addTransactionObserver(self)
SKPaymentQueue.defaultQueue().restoreCompletedTransactions()
restorepurchase.setTitle(NSLocalizedString("settings.inprogress", comment: "Transaction in progress"), forState: UIControlState.Normal)
self.transactionInProgress = true
println("Trying to restore purchases")
}
Has anyone experienced the same thing ? Does anyone know how to fix it ?
Thank you !