【发布时间】:2015-07-23 05:57:17
【问题描述】:
Twitter 为 Fabric 推出了一项新功能,允许 tracking of events。特别是可以使用以下 API 跟踪付款:
[Answers logPurchaseWithPrice:[NSDecimalNumber decimalNumberWithString:@"13.50"]
currency:@"USD"
success:@YES
itemName:@"Answers Shirt"
itemType:@"Apparel"
itemId:@"sku-350"
customAttributes:@{}];
我想通过应用内购买跟踪付款。
当在- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions 内购买成功时,如何获取这些参数就很明显了。例如
[Answers logPurchaseWithPrice:skProduct.price
currency:???
success:@YES
itemName:skProduct.localizedDescription
itemType:@"in app purchase"
itemId:aTransaction.payment.productIdentifier
customAttributes:@{}];
获取应该是 ISO4217 货币代码的货币字符串的最佳方法是什么?
【问题讨论】:
-
skProduct.priceLocale.localeIdentifier?
-
priceLocale 是一个很好的线索,谢谢
标签: ios in-app-purchase twitter-fabric