preferredLanguages incorrectly read in iOS 26.1 simulators ?

I have to use the user preferred language (the first, here French).

In didFinishLaunchingWithOptions, I select the first in the array of languages.

print(#function, Locale.preferredLanguages)
let prefLanguage = Locale.preferredLanguages.count > 0 ? Locale.preferredLanguages[0] : "en"  

So I expect to get Français.

That works OK in iOS 16 (both on device and simulator) as well as on iPad iOS 26, but not on iOS 26.1 simulator.

log for iOS 16 simulator or on devices:

application(_:didFinishLaunchingWithOptions:) ["fr-FR", "en-FR", "es-FR", "it-FR", "de-FR", "el-FR"]

log for iOS 26 (Xcode 26.3)

application(_:didFinishLaunchingWithOptions:) ["en-FR", "fr-FR", "es-FR", "de-FR", "it-FR", "el-FR"]

Order is changed.

Is this a known bug or am I missing something ?

Answered by Claude31 in 896833022

Problème does not show on iOS 26.2 simulator. So looks like it was a temporary bug that has been rapidly corrected…

Accepted Answer

Problème does not show on iOS 26.2 simulator. So looks like it was a temporary bug that has been rapidly corrected…

preferredLanguages incorrectly read in iOS 26.1 simulators ?
 
 
Q