let nowURL = documentsDirectory.URLByAppendingPathComponent("now.plist")
Saving in app:
if let filePath = nowURL.path {
NSKeyedArchiver.archiveRootObject(nowTasks, toFile: filePath)
}
Retrieving in app:
if let loadedNowArray = NSKeyedUnarchiver.unarchiveObjectWithFile(nowURL.path!) as? [Task] {
nowTasks = loadedNowArray
}
How can I get the data from the .plist as an object from inside of the todayViewController.swift file?
I have tried the retrieving method as shown above but it does not recognize the "documentsDirectory" for the path...