I\'ve searched the internet for help on this but to no avail. My app is live on the app store and a minority of users are reporting the app freezing on them and crashing aft
This is the crash because of the memory issue. I think you putto code like this after some delay it works batter. you can also use GCD Dispatch Timer
public func paymentQueue(queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
let delayTime = dispatch_time(DISPATCH_TIME_NOW, Int64(0.1 * Double(NSEC_PER_SEC)))
dispatch_after(delayTime, dispatch_get_main_queue()) {
for transaction in transactions {
switch (transaction.transactionState) {
case .Purchased:
completeTransaction(transaction)
break
case .Failed:
failedTransaction(transaction)
break
case .Restored:
restoreTransaction(transaction)
break
case .Deferred:
break
case .Purchasing:
break
}
}
} }