mzeeshanid/MZDownloadManager
소개
NSURLSession API를 사용해 파일을 다운로드하는 다운로드 관리자입니다. 여러 파일을 동시에 다운로드할 수 있으며, 앱이 백그라운드에 있어도 대용량 파일을 다운로드할 수 있습니다. 앱을 종료한 후에도 다운로드를 재개할 수 있습니다.
생산성 및 자동화What you can do
- 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.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- -1
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalMZDownloadManager

Features
This download manager uses the URLSession 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.
Screencast:
http://screencast.com/t/Rzm0xoRjGFUsage
To run the example project, clone the repo, and run pod install from the Example directory first.
Requirements
- Xcode 8
- Minimum deployment target is iOS 9.
- For resuming downloads server must have resuming support.
Installation
MZDownloadManager is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MZDownloadManager"
To install it by using Swift Package Manager:
- In Xcode 11+ Select File > Packages > Add Package Dependency....
- Enter this project's URL: https://github.com/mzeeshanid/MZDownloadManager.git
Update
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.
Try In a Live App
MZDownloadManager is used in MZFileManager app. To learn more about the app features, visit this page.
Author
Muhammad Zeeshan, [email protected]
If you find MZDownloadManager userful consider donating thanks ;)

License
MZDownloadManager is available under the BSD license. See the LICENSE file for more info.
관련 프로젝트 살펴보기
불러오는 중…