1

I am very new to iOS Programming and have been learning for only a month or two. My plan is to download files from websites. I am using MKNetworkKit and learning a little bit and testing it. I can download the file from the web but I cannot pause or cancel the download. I looked through the code but I don't know how to cancel the operation in the middle of the download. What I want to do is create a cancel button and when I hit it, it will trigger IBAction to cancel the download process. Another step is pause the download.

Hemang
  • 26,840
  • 19
  • 119
  • 186
zhtway
  • 283
  • 5
  • 20

1 Answers1

1

You cannot pause a request. You can however cancel it and if your server supports Range headers, MKNetworkKit automatically resumes your download.

Mugunth
  • 14,461
  • 15
  • 66
  • 94
  • Mugunth, I'm not sure how to resume the download. I start a download with the addDownloadStream, then turn airplane mode on, get operationFailedWithError, then I start the same download again and instead of resuming it starts over. What am I doing wrong? – andr111 Apr 25 '12 at 17:06
  • Does your server support Range header? MKNetworkKit supports resuming only when your server sends Range headers – Mugunth Apr 26 '12 at 13:38