Ios NSFileProviderExtension扩展显示下载进度
我已经实现了FileProvider扩展Ios NSFileProviderExtension扩展显示下载进度,ios,swift,fileprovider-extension,Ios,Swift,Fileprovider Extension,我已经实现了FileProvider扩展 class MyProviderExtension: NSFileProviderExtension { override func startProvidingItem(at url: URL, completionHandler: ((_ error: Error?) -> Void)?) { downloading file using URL and implemented download delegat
class MyProviderExtension: NSFileProviderExtension {
override func startProvidingItem(at url: URL, completionHandler: ((_ error: Error?) -> Void)?) {
downloading file using URL and implemented download delegates
// Download Delegate
func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64) {
**// How can I upload the download progress here.**
}
}
}
成功下载后,我无法让下载代理中的任何UI处理程序更新进度并更新单元格下载按钮。要支持下载/上载进度上的进度显示,您需要执行以下操作:
然后,文件提供程序扩展名将在UI上显示进度。如果需要执行多个NSURLSessionTask才能完成下载,我们该怎么办?