path to userdefaults on mac swift code example
Example: userdefault where
var path: [AnyObject] = NSSearchPathForDirectoriesInDomains(.libraryDirectory, .userDomainMask, true) as [AnyObject]
let folder: String = path[0] as! String
NSLog("Your NSUserDefaults are stored in this folder: %@/Preferences", folder)