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
For my txt file works this way:
let myFileURL = NSBundle.mainBundle().URLForResource("listacomuni", withExtension: "txt")! let myText = try! String(contentsOfURL: myFileURL, encoding: NSISOLatin1StringEncoding) print(String(myText))