Latest 0.1.2
Homepage https://github.com/cielpy/CPYDownloader
License MIT
Platforms ios 8.0
Dependencies AFNetworking
Authors

CI Status
Version
License
Platform

CPYDownloader is a simple multi task file downloader inspire by AFImageDownloader. It build on AFNetworking.

Usage

[[CPYDownloader defaultInstance] downloadFileWithURL:[NSURL URLWithString:url] progress:^(NSProgress * _Nonnull progress, NSURLRequest * _Nullable request) {
    NSLog(@"progress %@", progress);
} validation:^BOOL(NSURL * _Nonnull fileURL, NSURLResponse * _Nullable response) {
      // verify the downloaded file
    return YES;
} destination:^NSURL * _Nullable(NSURL * _Nonnull URL, NSURLResponse * _Nullable response) {
    // move the file to somewhere
    return nil;
} success:^(NSURLRequest * _Nullable request, NSHTTPURLResponse * _Nullable response, NSURL * _Nonnull URL) {

} failure:^(NSURLRequest * _Nullable request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) {

}];

Example

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

Requirements

  • iOS 8+

Installation

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

pod 'CPYDownloader'

Author

cielpy, [email protected]

License

CPYDownloader is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "CPYDownloader",
    "version": "0.1.2",
    "summary": "A simple multi task downloader.",
    "description": "A simple multi task downloader, inspire by AFImageDownloader.",
    "homepage": "https://github.com/cielpy/CPYDownloader",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "cielpy": "[email protected]"
    },
    "source": {
        "git": "https://github.com/cielpy/CPYDownloader.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "CPYDownloader/Classes/**/*",
    "dependencies": {
        "AFNetworking": [
            "~> 3.1.0"
        ]
    }
}

Pin It on Pinterest

Share This