mirror of
https://github.com/defold/extension-iap
synced 2025-06-27 10:27:46 +02:00
Update iap_ios.mm
This commit is contained in:
parent
38656e973c
commit
607b4a117e
@ -119,8 +119,20 @@ static void IAP_FreeTransaction(IAPTransaction* transaction)
|
|||||||
|
|
||||||
IAPProduct product = {0};
|
IAPProduct product = {0};
|
||||||
product.ident = strdup([p.productIdentifier UTF8String]);
|
product.ident = strdup([p.productIdentifier UTF8String]);
|
||||||
product.title = p.localizedTitle ? strdup([p.localizedTitle UTF8String]) : strdup([p.productIdentifier UTF8String]);
|
if (p.localizedTitle) {
|
||||||
product.description = p.localizedDescription ? strdup([p.localizedDescription UTF8String]) : "";
|
product.title = strdup([p.localizedTitle UTF8String]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dmLogWarning("Product %s has no localizedTitle", [p.productIdentifier UTF8String]);
|
||||||
|
product.title = "";
|
||||||
|
}
|
||||||
|
if (p.localizedDescription) {
|
||||||
|
product.description = strdup([p.localizedDescription UTF8String]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dmLogWarning("Product %s has no localizedDescription", [p.productIdentifier UTF8String]);
|
||||||
|
product.description = "";
|
||||||
|
}
|
||||||
product.currency_code = strdup([[p.priceLocale objectForKey:NSLocaleCurrencyCode] UTF8String]);
|
product.currency_code = strdup([[p.priceLocale objectForKey:NSLocaleCurrencyCode] UTF8String]);
|
||||||
product.price = p.price.floatValue;
|
product.price = p.price.floatValue;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user