如何通过应用内购买获得购买信息

时间:2017-09-19 11:35:38

标签: ios objective-c in-app-purchase

我如何获得有关用户购买的信息(购买日期,产品ID ...)?

switch (transaction.transactionState) {
        case SKPaymentTransactionStatePurchased: {
            NSLog(@"user has purchased, %@", transaction);
...
...

1 个答案:

答案 0 :(得分:1)

这些是相关的属性:

let purchaseDate = transaction.transactionDate
let transactionId = transaction.transactionIdentifier
let produtId = transaction.payment.productIdentifier