NSNumberFormatter returns incorrect currency symbol after setting the currency code

Originator:rics
Number:rdar://30368934 Date Originated:06-Feb-2017
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 10.2
Classification:Other Bug Reproducible:Always
 
Area:
Foundation

Summary:
Using an NSNumberFormatter with number style .currency, and setting the formatters currency code, the result of the string method is correct and uses the expected currency with the system locale. However, calling the formatters reported currencySymbol property reports that of the system locale instead of the previously set code.

Steps to Reproduce:
1. Run attached project, see output in the console or on the simulator device.

Expected Results:
Currency code is €

Actual Results:
Currency code is $

Version:
iOS 10.2

Notes:


Configuration:
iPhone 7 Simulator

Attachments:
'CurrencySymbolTest.zip' was successfully uploaded.

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!