ios – SKPaymentTransaction:什么是transactionDate?

前端之家收集整理的这篇文章主要介绍了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.

原文链接:https://www.f2er.com/iOS/333493.html

猜你在找的iOS相关文章