kubatruhlar / Afnetworking Retrypolicy
Licence: mit
Nice category that adds the ability to set the retry interval, retry count and progressiveness.
Stars: ✭ 197
Projects that are alternatives of or similar to Afnetworking Retrypolicy
Ppnetworkhelper
AFNetworking 3.x 与YYCache封装
Stars: ✭ 1,586 (+705.08%)
Mutual labels: afnetworking, cocoapods
Netfox
A lightweight, one line setup, iOS / OSX network debugging library! 🦊
Stars: ✭ 3,188 (+1518.27%)
Mutual labels: afnetworking, cocoapods
Pgnetworkhelper
PINCache做为AFNetworking缓存层,将AFNetworking请求的数据缓存起来,支持取消当前网络请求,以及取消所有的网络请求,除了常用的Get,Post方法,也将上传图片以及下载文件进行了封装,同样支持同步请求,使用方法极其简单。
Stars: ✭ 131 (-33.5%)
Mutual labels: afnetworking, cocoapods
Fradioplayer
A simple radio player framework for iOS, macOS, tvOS.
Stars: ✭ 183 (-7.11%)
Mutual labels: cocoapods
Whatsnewkit
Showcase your awesome new app features 📱
Stars: ✭ 2,329 (+1082.23%)
Mutual labels: cocoapods
Emalertcontroller
EMAlertController is a beautiful alternative to the stock iOS UIAlertController
Stars: ✭ 182 (-7.61%)
Mutual labels: cocoapods
Hxphotopicker
图片/视频选择器 - 支持LivePhoto、GIF图片选择、3DTouch预览、在线下载iCloud上的资源、编辑图片/视频、浏览网络图片 功能 Imitation wx photo/image picker - support for LivePhoto, GIF image selection, 3DTouch preview, Download the resources on iCloud online, browse the web image function
Stars: ✭ 2,363 (+1099.49%)
Mutual labels: cocoapods
Segmentio
Animated top/bottom segmented control written in Swift.
Stars: ✭ 2,310 (+1072.59%)
Mutual labels: cocoapods
Pull To Refresh.rentals Ios
This project aims to provide a simple and customizable pull to refresh implementation. Made in Yalantis
Stars: ✭ 2,171 (+1002.03%)
Mutual labels: cocoapods
Zbnetworking
AFNetworking4.X封装 GET/POST /PUT/PATCH /DELETE / Upload /DownLoad 网络请求 添加了请求缓存,断点下载,显示缓存大小,删除缓存,取消当前请求等功能
Stars: ✭ 186 (-5.58%)
Mutual labels: afnetworking
Ios Modular Architecture
Template iOS application using Modular Architecture
Stars: ✭ 190 (-3.55%)
Mutual labels: cocoapods
Collor
A declarative-ui framework for UICollectionView with great and useful features.
Stars: ✭ 182 (-7.61%)
Mutual labels: cocoapods
Smileviewcontroller
UIViewController which allows to detect smile in real time.
Stars: ✭ 189 (-4.06%)
Mutual labels: cocoapods
Cltypinglabel
iOS UILabel with character by character typing /typewriter animation
Stars: ✭ 192 (-2.54%)
Mutual labels: cocoapods
Displayswitcher
Custom transition between two collection view layouts
Stars: ✭ 2,253 (+1043.65%)
Mutual labels: cocoapods
If a request timed out, you usually have to call that request again by yourself. AFNetworking+RetryPolicy is an objective-c category that adds the ability to set the retry logic for requests made with AFNetworking.
Features
- [x] retryCount - How many times to try.
- [x] retryInterval - Time interval between attempts in seconds.
- [x] progressive - Next attempt will always take more time than the previous one. (Uses Exponentiation)
- [x] fatalStatusCodes - These will trigger failure block immediately when received and ends current retry.
Getting started
- Installing through CocoaPods with
pod 'AFNetworking+RetryPolicy'
- Use
#import "AFHTTPSessionManager+RetryPolicy.h"
directive.
Want to try it first? Use
pod try AFNetworking+RetryPolicy
command.
Usage
Example
- Simple
GET
request with AFNetworking+RetryPolicy could look like this:
AFHTTPSessionManager *manager = [AFHTTPSessionManager new];
[manager GET:@"foo" parameters:nil headers:nil progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {
NSLog(@"%@", responseObject);
} failure:^(NSURLSessionDataTask *task, NSError *error) {
NSLog(@"%@", error.localizedDescription);
} retryCount:5 retryInterval:2.0 progressive:false fatalStatusCodes:@[@401, @403]];
Log
- Enable to see what is happening by setting the
AFHTTPSessionManager
’sretryPolicyLogMessagesEnabled
property totrue
. Disabled by default.
Requirements
- AFNetworking 4.0 or later
- Target iOS 9 or later
- Target OS X/macOS 10.10 or later
- Xcode 11 or later
Old versions
AFNetworking 3 support
For- use version 1.x.
AFNetworking 2 support*
For- use branch
afn2-support
. - Installing through CocoaPods with
pod 'AFNetworking+RetryPolicy', git: 'https://github.com/kubatruhlar/AFNetworking-RetryPolicy.git' , branch: 'afn2-support'
*Will not be updated anymore.
AFNetworking 1 support*
For- use branch
afn1-support
. - Installing through CocoaPods with
pod 'AFNetworking+RetryPolicy', git: 'https://github.com/kubatruhlar/AFNetworking-RetryPolicy.git' , branch: 'afn1-support'
*Will not be updated anymore.
Author and credit
- This library is open-sourced and maintained by Jakub Truhlář.
- AFNetworking is owned and maintained by the Alamofire Software Foundation.
License
- Like 👍 AFNetworking, this category is published under the MIT License. See LICENSE.md for details.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].