I need to read and write data to/from a text file, but I haven\'t been able to figure out how.
I found this sample code in the Swift\'s iBook, but I still don\'t kno
I had to recode like this:
let path = NSBundle.mainBundle().pathForResource("Output_5", ofType: "xml") let text = try? NSString(contentsOfFile: path! as String, encoding: NSUTF8StringEncoding) print(text)