Why Xcode 6.1 killed [NSLocale preferredLanguages] in iOS 8 simulators

Xcode was updated to v6.1 yesterday.

Now [NSLocale preferredLanguages] returns an empty array in iPhone, but only for iOS 8 - both in iPhone 5 and 6 emulators. IOS 7 simulators are still working fine.

The physical device of the iPhone 6 does not seem to be affected - it's just simulators.

Regular attempts - a clean project, restarting Xcode, rebooting a Mac - make no difference. So, what's the best strategy - wait for Xcode 6.1.1 or send a complaint to the Apple list (which one)?

+4
source share
4 answers

I noted this for consideration as a hoax. Global settings do not work in the simulator iOS 8.1. Localization is one such global preference. Cm:

iOS8.1. ,

""... , , , , http://bugreport.apple.com

0

currentLocale swizzling, . .

. ,

enter image description here

Application language Application region . .

Product -> Scheme -> Edit scheme...

enter image description here

+7

-, , . -, , [NSLocale preferredLanguages] Xcode 6.1 (6A1052c) iOS 8.1, "en" , . , iOS 7.

, : iOS 8.1 .

0

Product setup → Scheme → Settings ... did not help me, so I made a simple way:

NSString *language = [[NSLocale preferredLanguages] count] > 0 ? 
    [[NSLocale preferredLanguages] objectAtIndex:0] : 
    @"en";
0
source

All Articles