I\'m trying to implement downloading of a large file and show to user current progress, but block in:
-[AFURLConnectionOperation setDownloadProgressBlock:]
I have no problems with the setDownloadProgressBlock in AFNetworking.
The wiki explains how to track download progress: https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-FAQ
For progress tracking you don't need the bytesRead
(number of bytes written in a particular callback).
Example code:
[downloadoperation setDownloadProgressBlock:^(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) {
float progress = ((float)totalBytesRead) / totalBytesExpectedToRead;
self.progressView.progress = progress;
}];