Unresolved Identifier - SKErrorPaymentCancelled

Viewed 4636

I updated to the latest version of Xcode 7.3 with the release of iOS 9.3 & OSX 10.11.4 (inclusive of Swift 2.2) yesterday.

When I build my app I get an error stating Use of unresolved identifier 'SKErrorPaymentCancelled' which I use to check if the user has cancelled a payment. I don't do anything special with it, just log it (as seen below).

private func failedTransaction(transaction: SKPaymentTransaction) {
    print("failedTransaction...")
    if transaction.error!.code == SKErrorPaymentCancelled {
        print("Transaction Cancelled: \(transaction.error!.localizedDescription)")
    }
    else {
        print("Transaction Error: \(transaction.error!.localizedDescription)")
    }
    SKPaymentQueue.defaultQueue().finishTransaction(transaction)
}

I can't find anything in the Swift 2.2 changelog that states anything within StoreKit was changed. This worked fine before I updated.

Is anyone else seeing this issue?

1 Answers
Related