Hey,
i'm uploading data (mostly about 1MB files) with a uploadTaskWithStreamedRequest.
To give the user feedback about the upload progress i'm using didSendBodyData-delegate:
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didSendBodyData:(int64_t)bytesSent totalBytesSent:(int64_t)totalBytesSent totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend
{
if (task == uploadTask) {
double progress = (double)totalBytesSent / (double)totalBytesExpectedToSend;
dispatch_async(dispatch_get_main_queue(), ^{
hud.progress = progress;
});
}
}
Before iOS 10 the progressbar smoothly growed, since iOS10 the delegate seems to be just called twice, once at the beginning and last on nearly finished upload process. If i run it on the simulator against iOS 9.3 its smooth again.
Did I miss any change?
Best regards,
Nils