I have a problem with Swift and iOS 8 Emulator in Xcode 6.1.
Indeed, when I try to use NSLocale, almost all of its functions return nil.
Here is how I use it:
let cc = "fr" // Example let locale = NSLocale.currentLocale() let countryName = locale.displayNameForKey(NSLocaleCountryCode, value : cc) println(countryName) // Shows : nil
It works on devices, iOS 7 and iOS 8 and on the iOS 7 simulator. It does not work on the iOS 8 simulator and on the Playground, it is even EXC_BAD_ACCESS. I assume this is just a simulator and a problem with the playground, but this is weird. And I want to know if anyone has a workaround.
I cleared the received data, restarted and cleared the simulator data. Not better.
xcode ios8 swift nslocale
allbto Oct 28 '14 at 8:30 2014-10-28 08:30
source share