logPurchaseWithCurrencyWithPriceAndQuantity

This method logs all application purchase events and their metadata in a central CRM database. Users can view analytics from the Insights screen on the Hurree dashboard.

To add the method

Add this method where a purchase is normally complete in your app.

- (void)logPurchaseWithCurrencyWithPriceAndQuantity:(NSString *_Nonnull)productIdentifier
currencyCode:(NSString * _Nonnull)currencyCode
price:(NSDecimalNumber * _Nonnull)price
quantity:(NSInteger)quantity;

Example

Objective C
Swift
[instance_object logPurchaseWithCurrencyWithPriceAndQuantity:@"LEVEL7_GAMEOFTHRONES"
    currencyCode:@"USD"
    price:[NSDecimalNumber decimalNumberWithString:@"30"]
    quantity:1.0
];
instance.logPurchaseWithCurrencyWithPriceAndQuantity(
    productIdentifier: "LEVEL7_GAMEOFTHRONES",
    currencyCode: "USD",
    price: NSDecimalNumber.decimalNumberWithString("30"),
    quantity:1.0
)

Arguments

These are the arguments that define the method.

Name Type Mandatory Description
productIdentifier String Mandatory This is the name of the purchased product. It is returned by the iTunes store.
currencyCode String Mandatory This is the currency code, represented as an ISO 4217 (http://www.xe.com/iso4217.php).
price Decimal Mandatory This is the price. It is identical to that of the SKProduct class returned value.
quantity Integer This is the quantity of the purchased product.

results matching ""

    No results matching ""