com*_*ial 4 in-app-purchase ios twitter-fabric
Twitter已经为Fabric推出了一项新功能,可以跟踪事件.特别是可以使用以下API跟踪付款:
[Answers logPurchaseWithPrice:[NSDecimalNumber decimalNumberWithString:@"13.50"]
currency:@"USD"
success:@YES
itemName:@"Answers Shirt"
itemType:@"Apparel"
itemId:@"sku-350"
customAttributes:@{}];
Run Code Online (Sandbox Code Playgroud)
我想通过应用内购买跟踪付款.
当购买内部成功时- (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:@{}];
Run Code Online (Sandbox Code Playgroud)
获取应该是ISO4217货币代码的货币字符串的最佳方法是什么?
货币代码可以从以下地址获得:
[skProduct.priceLocale objectForKey:NSLocaleCurrencyCode]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
341 次 |
| 最近记录: |