Bit6FileDownloader Class Reference
Bit6FileDownloader handles the downloads of the framework using NSOperationQueue and NSURLSessionDownloadTask.
Cancels all pending download operations.
Download a file. It can be set to replace any file in the indicated path if necessary. When running from an extension, a copy of the file will be saved in the SDK group container.
+ (void)downloadFileAtURL:(NSURL *)url toFilePath:(NSString *)filePath canReplace:(BOOL)replace preparationBlock:(nullable NSData *( ^ ) ( NSData *data ))preparationBlock priority:(NSOperationQueuePriority)priority completionHandler:(nullable void ( ^ ) ( NSURL *_Nullable location , NSURLResponse *_Nullable response , NSError *_Nullable error ))completionHandler
remote URL address of the file to download.
local path where to save the file.
the file will be downloaded and will replace the file in cache.
block to process the downloaded data before saving it to the filePath.
the execution priority of the operation in the operation queue.
Block to call after the operation has been completed. The “error” value can be use to know if the file was downloaded and saved in cache.
Query is a URL is being downloaded.
+ (BOOL)isDownloadingFileAtURL:(NSURL *)url
remote URL address of the file.
true if the specified URL is being downloaded.