iOS 16.5 Beta - NumberFormatter Issue

let numberFormatter = NumberFormatter() let value = numberFormatter.number(from: "5.6")

Here value gives nil value in iOS 16.5 Beta. It is working as expected in iOS 16.4 and below versions. (It gives 5.6)

Accepted Answer

Are you sure the locale is set to the right one? Test with

let value = numberFormatter.number(from: "5,6")

Just to check

Yes @Claude31 you are correct. It is NSLocale issue. This is working fine in USA and India Regions. It is failed in France region. Thanks for your help in identifying this issue.

iOS 16.5 Beta - NumberFormatter Issue
 
 
Q