Latest1.0.0
Homepagehttps://github.com/czqasngit/STDownloader
LicenseMIT
Platformsios 9.0
Authors

A light weight data download libiary.

CI Status
Version
License
Platform

Example

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

Installation

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

pod 'STDownloader'

Sample Code

NSString *downloadUrlString = @"https://dldir1.qq.com/qqfile/qq/TIM2.1.5/23141/TIM2.1.5.exe" ;
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:downloadUrlString]] ;
NSUUID *receiptID = [NSUUID UUID] ;
STDownloadSuccess success = ^(NSURLRequest *request,NSString *downloadFilePath) {
    NSLog(@"Download Success:%@",downloadFilePath) ;

} ;
STDownloadProgress progress = ^(NSURLRequest *request,NSUInteger receiveDataLength,NSUInteger totalDataLength,NSData *receiveData) {
    NSLog(@"Download Progress:%.2f",receiveDataLength * 1.0f / totalDataLength) ;
};
STDownloadFailure failure = ^(NSURLRequest *request,NSError *error) {
    NSLog(@"Download Failure:%@",error) ;
} ;
[[STDownloader defaultInstance] downloadFileForURLRequest:request receiptID:receiptID success:success progress:progress failure:failure] ;

Author

czqasn,[email protected]

License

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

Latest podspec

{
    "name": "STDownloader",
    "version": "1.0.0",
    "summary": "A light weight data download libiary .",
    "description": "A simple and easy light weight data download libiary",
    "homepage": "https://github.com/czqasngit/STDownloader",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "czqasn": "[email protected]"
    },
    "source": {
        "git": "https://github.com/czqasngit/STDownloader.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "STDownloader/Classes/**/*"
}

Pin It on Pinterest

Share This