I noticed that the StoreKit.mm simply returns:
lua_pushnumber(L, [product.price doubleValue]);
lua_setfield(L, -2, "price"); |
However, it is recommended to return a localized price string. Can I suggest providing this as an additional field in the StoreKit plug-in? The code for it is:
NSNumberFormatter *formatter = [[[NSNumberFormatter alloc] init] autorelease];
[formatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
[formatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[formatter setLocale:product.priceLocale];
NSString *currencyString = [formatter stringFromNumber:product.price]; |
Comments
I used this code snippet in my local storekit.mm, I hop it would be better to included in the offical release.
https://sites.google.com/site/xraystudiogame