Skip to content
This download manager uses NSURLSession api to download files. It can download multiple files at a time. It can download large files if app is in background. It can resume downloads if app was quit.
Branch: master
Clone or download
Muhammad Zeeshan
Muhammad Zeeshan - Merge branch 'urlrequest'
- Merge PR#44
Latest commit b502e98 Oct 10, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example - updated for swift 4.2 Oct 9, 2018
MZDownloadManager - Merge branch 'urlrequest' Oct 10, 2018
.travis.yml updating travis yml Apr 27, 2016
MZDownloadManager.podspec updated deployment target info Nov 18, 2016
_config.yml Set theme jekyll-theme-cayman Jul 6, 2017


CI Status Version License Platform

mzdownload manager hero


This download manager uses the iOS 7 NSURLSession api to download files.

  • Can download large files if app is in background.
  • Can download files if app is in background.
  • Can download multiple files at a time.
  • It can resume interrupted downloads.
  • User can also pause the download.
  • User can retry any download if any error occurred during download.



To run the example project, clone the repo, and run pod install from the Example directory first.


  • Xcode 8
  • Minimum deployment target is iOS 9.
  • For resuming downloads server must have resuming support.


MZDownloadManager is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "MZDownloadManager"


New helper functions added to support downloading at custom path. Example project is also updated about the usage.

To download file at custom path you can use the following instance method of MZDownloadManager:

public func addDownloadTask(fileName: String, fileURL: String, destinationPath: String)

When download completes:

  • It will check if the destination folder still exists then it will move the downloaded file at the specified destination and call success delegate method.
  • If destination folder does not exists, following delegate method will provide an opportunity to handle the downloaded file appropriately.

optional func downloadRequestDestinationDoestNotExists(downloadModel: MZDownloadModel, index: Int, location: NSURL)

  • If the above delegate method is not implemented then it will just called the failure method.

Important: This delegate method will be called on the session's queue.


Muhammad Zeeshan,

If you find MZDownloadManager userful consider donating thanks ;)
Donate button


MZDownloadManager is available under the BSD license. See the LICENSE file for more info.

You can’t perform that action at this time.