Yesterday Xcode updated to v6.1.
Now, [NSLocale preferredLanguages] is returning an empty array in the iPhone, but only for IOS 8 - both in iPhone 5 and 6 emulators. IOS 7 simulators are still working fine.
A physical iPhone 6 device doesn't appear to be affected - it's just the simulators.
The usual attempts - clean project, restart Xcode, reboot Mac - have made no difference. So, what's the best strategy - wait for Xcode 6.1.1, or send a complaint to an Apple list (which one) ?
You can use category with currentLocale
method swizzling as described in here. The category allows one to override in general language and region settings in the project for all targets at once.
Also you can use scheme settings for each target in separate way. If you have many localizations in your app,
you can change Application language
and Application region
in scheme settings for each target. You can even make a separate target for each localization for faster language tests.
Product -> Scheme -> Edit scheme...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With