URLSessionTaskDelegate has two methods - didSendBodyData that called every upload progress update, and didCompleteWithError that called at the end of the file transfer.
The problem is that didSendBodyData reaches 100%, and only 2-3 seconds after didCompleteWithError called with success.
This means I have a loader or a progress bar, and only 2-3 seconds after it reaches 100% I can show something on the screen. It is frustrating.
Anybody knows what is the solution here?
Note: Already made sure I update the UI on the main thread.
Thanks!