TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Nov 2015 |
Maintained by Grigory Lutkov.
Depends on: | |
AFNetworking | ~> 2.5.0 |
Reachability | ~> 3.2 |
XMLReader-Arc | ~> 1.1 |
LGHelper | ~> 1.1.0 |
iOS wrapper around AFNetworking makes it easy to use.
platform :ios, '6.0'
pod 'LGConnection', '~> 1.0.0'
In the source files where you need to use the library, import the header file:
#import "LGConnection.h"
You have several methods for initialization:
- (instancetype)initWithRepeatAfterConnectionLost:(BOOL)repeat;
- (instancetype)initWithRepeatAfterConnectionLost:(BOOL)repeat
connectionLostHandler:(void(^)())connectionLostHandler
connectionRestoreHandler:(void(^)())connectionRestoreHandler;
LGConnection use Reachability to watch for internet connection. "RepeatAfterConnectionLost" means that if connection is lost, then all requests will try to reconnect while connection is restoring.
For more details see LGConnection.h
LGConnection is released under the MIT license. See LICENSE for details.