I'm reasonably new to swift, im making a simple class to read and write data from a .plist. I cannot understand why I am getting this compiler error when declaring these constants.
class Data {
let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true) as NSArray
let documentDirectory = paths[0] as! String
}
error:
'Data.type' does not have a member named 'paths'