All Projects → guowilling → Srdownloadmanager

guowilling / Srdownloadmanager

Licence: mit
Powerful and easy-to-use file download manager based on NSURLSession. Provide download status, progress and completion callback block.

Projects that are alternatives of or similar to Srdownloadmanager

Uploader
A lightweight and very configurable jQuery plugin for file uploading using ajax(a sync); includes support for queues, progress tracking and drag and drop.
Stars: ✭ 1,042 (+371.49%)
Mutual labels:  queue, progress
Deque
Fast ring-buffer deque (double-ended queue)
Stars: ✭ 203 (-8.14%)
Mutual labels:  queue
Pkgi Ps3
A PlayStation 3 package download tool
Stars: ✭ 177 (-19.91%)
Mutual labels:  download-manager
Stevejobs
A simple jobs queue that just works (for Meteor.js)
Stars: ✭ 195 (-11.76%)
Mutual labels:  queue
Django dramatiq
A Django app that integrates with Dramatiq.
Stars: ✭ 181 (-18.1%)
Mutual labels:  queue
Progress dialog
A light weight library to easily manage a progress dialog with simple steps whenever you need to do it. You can easily show and hide it.
Stars: ✭ 196 (-11.31%)
Mutual labels:  progress
Flask Rq2
A Flask extension for RQ.
Stars: ✭ 176 (-20.36%)
Mutual labels:  queue
Progressmanager
⏳ Listen the progress of downloading and uploading in Okhttp, compatible Retrofit and Glide (一行代码即可监听 App 中所有网络链接的上传以及下载进度, 包括 Glide 的图片加载进度).
Stars: ✭ 2,463 (+1014.48%)
Mutual labels:  progress
Xdm
Powerfull download accelerator and video downloader
Stars: ✭ 3,226 (+1359.73%)
Mutual labels:  download-manager
C Macro Collections
Easy to use, header only, macro generated, generic and type-safe Data Structures in C
Stars: ✭ 192 (-13.12%)
Mutual labels:  queue
Telerik Academy
Course exercises | Telerik Academy 2013/2014 | Martin Nikolov
Stars: ✭ 186 (-15.84%)
Mutual labels:  progress
Wechatvideocourse
《微信公众号+小程序快速开发》视频教程课件及代码
Stars: ✭ 185 (-16.29%)
Mutual labels:  queue
Progress
A PHP package to determine steps and progress.
Stars: ✭ 197 (-10.86%)
Mutual labels:  progress
Alive Progress
A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
Stars: ✭ 2,940 (+1230.32%)
Mutual labels:  progress
Chronicle Queue
Micro second messaging that stores everything to disk
Stars: ✭ 2,489 (+1026.24%)
Mutual labels:  queue
Hgcircularslider
A custom reusable circular / progress slider control for iOS application.
Stars: ✭ 2,240 (+913.57%)
Mutual labels:  progress
Interview Questions
List of all the Interview questions practiced from online resources and books
Stars: ✭ 187 (-15.38%)
Mutual labels:  queue
Data Structures
A collection of powerful data structures
Stars: ✭ 2,534 (+1046.61%)
Mutual labels:  queue
Mkmagneticprogress
A circular progress bar for iOS written in Swift
Stars: ✭ 214 (-3.17%)
Mutual labels:  progress
Promise Queue
Promise-based queue
Stars: ✭ 210 (-4.98%)
Mutual labels:  queue

SRDownloadManager

Powerful and easy-to-use file download manager based on NSURLSession. Provide download status, progress and completion callback block.

image

Features

  • [x] Support breakpoint download even exit the App and multitasking download at the same time.
  • [x] Support to customize the directory to save files or specify the path to save file.
  • [x] Support to set maximum concurrent downloads and waiting for download queue mode.
  • [x] Support to delete file by URL or name and clear all files that have been downloaded.

Installation

CocoaPods

Add pod 'SRDownloadManager' to the Podfile, then run pod install in the terminal.

Manual

Drag the SRDownloadManager folder to the project.

APIs

/**
 Starts a file download action with URL, download state, download progress and download completion block.
 
 @param URL        The URL of the file which to be downloaded.
 @param destPath   The path to save the file after the download is completed, if pass nil file will be saved in default path.
 @param state      A block object to be executed when the download state changed.
 @param progress   A block object to be executed when the download progress changed.
 @param completion A block object to be executed when the download completion.
 */
- (void)download:(NSURL *)URL
        destPath:(NSString *)destPath
           state:(void (^)(SRDownloadState state))state
        progress:(void (^)(NSInteger receivedSize, NSInteger expectedSize, CGFloat progress))progress
      completion:(void (^)(BOOL success, NSString *filePath, NSError *error))completion;

Usage

[[SRDownloadManager sharedManager] download:URL destPath:nil state:^(SRDownloadState state) {
    // Called when the download state changed.
} progress:^(NSInteger receivedSize, NSInteger expectedSize, CGFloat progress) {
    // Called when the download progress changed.
} completion:^(BOOL success, NSString *filePath, NSError *error) {
    // Called when the download completion.
}];

Custom

/**
 The directory where downloaded files are cached, default is .../Library/Caches/SRDownloadManager if not setted.
 */
@property (nonatomic, copy) NSString *cacheFilesDirectory;

/**
 The count of max concurrent downloads, default is -1 which means no limit.
 */
@property (nonatomic, assign) NSInteger maxConcurrentCount;

/**
 The mode of waiting download queue, default is FIFO.
 */
@property (nonatomic, assign) SRWaitingQueueMode waitingQueueMode;

Contacts

Submit an issue or email me if you have any questions. [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].