ios – SKPaymentTransaction:什么是transactionDate?

在Apple的文档中,transactionDate是:

The date the transaction was added to the App Store’s payment queue. (read-only)

我只是想澄清在以下情况下transactionDate的内容:

>在T1时刻买了东西(transactionDate是T1?)
>在T2时间恢复购买(transactionDate是T2还是T1?)
> originalTransaction恢复的事务,是其transactionDate T1还是T2?

谢谢!

解决方法

  1. purchased something at time T1 (transactionDate is T1?)

是. transactionDate是T1.关注apple的文档:

transactionDate : The date the transaction was added to the App Store’s payment queue.

  1. restored purchase at time T2 (transactionDate is T2 or T1?)

无所谓.如果transactionState设置为SKPaymentTransactionStateRestored,则应阅读originalTransaction.关注apple的文档:

originalTransaction : The contents of this property are undefined except when
transactionState is set to SKPaymentTransactionStateRestored. When a
transaction is restored,the current transaction holds a new
transaction identifier,receipt,and so on. Your application will read
this property to retrieve the restored transaction.

  1. originalTransaction of restored transaction,is its transactionDate
    T1 or T2?

T1.

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...