Swift 3
import UIKit
// Save String to file
let fileName = "TextFile"
let documentDirectory = try FileManager.default.urlForDirectory(.documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
var fileURL = try documentDirectory.appendingPathComponent(fileName).ap...