Swift – Downloading video with downloadTaskWithURL
Please check comments through the code: Xcode 8 • Swift 3 import UIKit import Photos class ViewController: UIViewController { func downloadVideoLinkAndCreateAsset(_ videoLink: String) { // use guard to make sure you have a valid url guard let videoURL = URL(string: videoLink) else { return } guard let documentsDirectoryURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first else { … Read more