Latest 1.0.2
Homepage https://github.com/emsihyo/RetriableAFNetworking
License MIT
Platforms ios 8.0, watchos 2.0, tvos 9.0, osx 10.9, requires ARC
Dependencies Retriable, AFNetworking, JRSwizzle
Authors

License MIT
Build Status
Carthage compatible
Pod Version
Pod Platform

Retriable AFNetworking

Cocoapods

Add the following to your project’s Podfile:

pod 'RetriableAFNetworking'

Carthage

Add the following to your project’s Cartfile:

github "emsihyo/RetriableAFNetworking"

Example

[sessionManager GET:@"https://api.github.com/repos/emsihyo/RetriableAFNetworking/readme" headers:nil parameters:nil progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {

} failure:^(NSURLSessionDataTask *task, NSError *error) {

} retryAfter:^NSTimeInterval(NSInteger currentRetryTime, NSError *latestError) {
if(![latestError.domain isEqualToString:NSURLErrorDomain]) return 0;
switch (latestError.code) {
case NSURLErrorTimedOut:
case NSURLErrorNotConnectedToInternet:
case NSURLErrorNetworkConnectionLost: return 5;
default: return 0;
}
}];

Latest podspec

{
    "name": "RetriableAFNetworking",
    "version": "1.0.2",
    "license": "MIT",
    "summary": "Retriable AFNetworking",
    "homepage": "https://github.com/emsihyo/RetriableAFNetworking",
    "authors": {
        "emsihyo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/emsihyo/RetriableAFNetworking.git",
        "tag": "1.0.2"
    },
    "description": "Retriable AFNetworking.",
    "requires_arc": true,
    "platforms": {
        "ios": "8.0",
        "watchos": "2.0",
        "tvos": "9.0",
        "osx": "10.9"
    },
    "source_files": "RetriableAFNetworking/*.{h,m}",
    "dependencies": {
        "Retriable": [],
        "AFNetworking": [],
        "JRSwizzle": []
    }
}

Pin It on Pinterest

Share This