if (transaction.transactionState == SKPaymentTransactionStateRestored) {
}
else if(transaction.transactionState == SKPaymentTransactionStatePurchased){
}
Apple提示“你已经购买了这个项目,点击确定下载”但是没有调用SKPaymentTransactionStateRestored,状态仍为“SKPaymentTransactionStatePurchased”,因此这些代码无效。
我认为“originalTransaction”可能对我有所帮助,这里是我的代码:
SKPaymentTransaction *trans = transaction.originalTransaction;
if (trans) {
// restored transaction
}
else{
// not restored transaction, purchased?
}
这些代码可靠吗?感谢。