Locate the iOS Simulator directory

Sometimes I need to find out where an app is physically located when run in the iOS simulator. Putting this in the appdelegate.swift file will output the location:

let appDir = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true).last as! String

println("App directory = \(appDir)")