If you look at AFImageDownloader this, it is used by the UIImageView category to download images. In this class you
- (nullable AFImageDownloadReceipt *)downloadImageForURLRequest: (NSURLRequest *)request
success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *responseObject))success
failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure;
It returns a receipt which has a NSURLSessionDataTask *task property. NSURLSessionDataTask has different properties of how bytes download, expected bytes to receive etc. Perhaps you can use this and achieve your task.