People! Who in the subject tell me how to save the downloaded file in the correct application folder? There is a code for downloading a remote * .xml file .. how to save it? Which variable to pull out after downloading and build a save path for storing and rewriting, if necessary
let url = NSURL(string:"http://........./file.xml")! let task = NSURLSession.sharedSession().dataTaskWithURL(url) { (data, response, error) in if error != nil { NSLog("%@", "Error: \(error)"); return } NSLog("Loaded %i bytes", data!.length) } task.resume()