Price formatted with SKProduct.priceLocale does not match price in App Store
| Originator: | an00na | ||
| Number: | rdar://27638518 | Date Originated: | 01-Aug-2016 10:43 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 10.0 beta 3 |
| Classification: | Other Bug | Reproducible: | Always |
Summary: This is code provided in doc of SKProduct: NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; [numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4]; [numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; [numberFormatter setLocale:product.priceLocale]; NSString *formattedString = [numberFormatter stringFromNumber:product.price]; However, the output does not match the price in App Store. For example, if the current user’s App Store is China App Store, the prices in his App Store are all in the format of “¥50”, no matter what’s his system language or region is set to. I think it is the correct behavior. In contrast, the price formatted with SKProduct.priceLocale(as in the code above) is “CN¥50” if the product is from China App Store when the system region is set to US. So it seems the SKProduct.priceLocale is not really locale of the App Store but a mixture of App Store region and system region, which I think is not the correct behavior because it is inconsistent with what users see and pay in the App Store.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!