Adam Johns Adam Johns - 1 month ago 11
iOS Question

NSLocale.current.description crashing in Xcode 9

I created a brand new single view application and added one line to the

viewDidLoad
method of the
ViewController.swift
file:

override func viewDidLoad() {
super.viewDidLoad()
_ = NSLocale.current.description
}


The
NSLocale.current.description
line crashes in Xcode 9 with no stack trace (just a EXC_BAD_ACCESS code=EXC_I386_GPFLT error message). The same project runs fine in Xcode 8.3.3. Anyone have any ideas why this is happening?

enter image description here

Here is my simulator region settings:

enter image description here

Answer Source

This was a bug fixed in Xcode 9 Beta 5.