Twitter has launched a new feature for Fabric that allows you to track events . In particular, you can track the payment using the following API:
[Answers logPurchaseWithPrice:[NSDecimalNumber decimalNumberWithString:@"13.50"]
currency:@"USD"
success:@YES
itemName:@"Answers Shirt"
itemType:@"Apparel"
itemId:@"sku-350"
customAttributes:@{}];
I want to track payments through in-app purchases.
When the purchase completes inside - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions, then it is obvious how to get some of these options. For instance.
[Answers logPurchaseWithPrice:skProduct.price
currency:???
success:@YES
itemName:skProduct.localizedDescription
itemType:@"in app purchase"
itemId:aTransaction.payment.productIdentifier
customAttributes:@{}];
What is the best way to get the currency string, which should be the ISO4217 currency code?
source
share