We use NumberFormatter class to format some amounts in the app. Since we migrated on iOS 13, it seems that the groupingSeparator space used for the Locale fr_FR changed.
We have tests on formatted strings amounts such as :
var amount = "1000"
XCTAssertEqual(amount.formattedValue, "1 000,00")
On iOS < 13, This test succeeds. But if we launch test on iOS > 13, this test will fail.
The reason is because the type of space used for the groupingSeparator property of NumberFormatter in iOS 13 has changed so
1 000,00 will not be equal to 1 000,00 according the space grouping separator which is used.
Any idea to always use the correct space grouping separator according the current iOS version ?
Edit : We found that the used space on iOS 13 is now the NARROW NO-BREAK SPACE
Edit 2 : The currencyGroupingSeparator has also changed with the NNBSP, all currency grouping separator have been replaced with this new one.