I learned a lot, but could not find anything. After I tried this in my code, considering it a download task, I found out that we can โpause, resumeโ download tasks using NSURLSession, only we do this when loading tasks.
To pause a task, just call [yourUploadTask suspend]; to resume [yourUploadTask resume]; To cancel [yourUploadTask cancel];
This might help someone working on uploadTask using NSURLSession.
Tabish sohail
source share