Code Monkey home page Code Monkey logo

edison9888 / zeedownloadmanager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mzeeshanid/zeedownloadmanager

0.0 1.0 0.0 251 KB

This download manager uses the ASIHTTPRequest classes to download files. 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.

License: Other

zeedownloadmanager's Introduction

ZeeDownloadManager

Features:

1) This download manager uses the ASIHTTPRequest classes to download files.

2) Can download files if app is in background.

3) Can download multiple files at a time.

4) It can resume interrupted downloads.

5) User can also pause the download.

6)User can retry any download if any error occurred during download.

Screenshot

USAGE:

You need ASIHTTPRequest classes get it https://github.com/pokeb/asi-http-request and setup your project Copy the ZeeDownloadsViewController.h ,m and xib file in your xcodeproject.

STEPS

1)Initialize ZeeDownloadManagerViewController. (Must retain its object. Otherwise app will crash)

2)Set delegate

3)Initiaze array with urls

4)"resumeAllInterruptedDownloads" call this instance method to resume interrupted downloads

5)Setup your tableview and list down the URLs

6)Use the following delegate methods.

-(void)downloadRequestStarted:(ASIHTTPRequest *)request;

-(void)downloadRequestReceivedResponseHeaders:(ASIHTTPRequest *)request responseHeaders:(NSDictionary *)responseHeaders;

-(void)downloadRequestFinished:(ASIHTTPRequest *)request;

-(void)downloadRequestFailed:(ASIHTTPRequest *)request;

-(void)downloadRequestPaused:(ASIHTTPRequest *)request;

-(void)downloadRequestCanceled:(ASIHTTPRequest *)request;

Thats it

Precautions:

1) Don't start multiple downloading with the same URL. It will cause inconsistency.

2) Must retain the "ZeeDownloadsViewController" object. If it is destroyed or release than app will crash because of ASIHTTPRequest delegates.

3) InterruptedDownloads.txt contains the URL of the request that are started. These URLs are used to resume the interrupted downloads. This file is placed in the document directory. You must take care of this file.

4) Server must have resuming support.

zeedownloadmanager's People

Contributors

mzeeshanid avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.