diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-11-19 18:16:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-19 18:16:38 +0100 |
commit | d629a753ec8d6b3e01f608652e43909be1b2c254 (patch) | |
tree | 00f3f255bb3a12666c4b5d2ae136444289fff837 | |
parent | 3c5ce7cd8598c7e38f3c74ebf8e1b3e9c14fbf6e (diff) | |
parent | 785f364bb0be0f4c38dcbc32e30bb7668da1989f (diff) |
Merge pull request #13033 from MednauN/master
Add currency code to iOS product details response
-rw-r--r-- | platform/iphone/in_app_store.mm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm index 9efd4b9891..25f4e1e166 100644 --- a/platform/iphone/in_app_store.mm +++ b/platform/iphone/in_app_store.mm @@ -92,6 +92,7 @@ void InAppStore::_bind_methods() { PoolRealArray prices; PoolStringArray ids; PoolStringArray localized_prices; + PoolStringArray currency_codes; for (int i = 0; i < [products count]; i++) { @@ -105,12 +106,14 @@ void InAppStore::_bind_methods() { prices.push_back([product.price doubleValue]); ids.push_back(String::utf8([product.productIdentifier UTF8String])); localized_prices.push_back(String::utf8([product.localizedPrice UTF8String])); + currency_codes.push_back(String::utf8([[[product priceLocale] objectForKey:NSLocaleCurrencyCode] UTF8String])); }; ret["titles"] = titles; ret["descriptions"] = descriptions; ret["prices"] = prices; ret["ids"] = ids; ret["localized_prices"] = localized_prices; + ret["currency_codes"] = currency_codes; PoolStringArray invalid_ids; |