= "https://remoteteakettle.com/boiledwater.pdf" let filepath = "Documents/local_teakettle" if let url = NSURL(string: urlstring) { let task = NSURLSession.sharedSession().downloadTaskWithURL(url, completionHandler: { (location:NSURL?, response:NSURLResponse?, error:NSError?) in if let loc = location, path = loc.path { try! NSFileManager.defaultManager().moveItemAtPath(path, toPath:filepath) } }) task.resume() }