LGConnection 1.0.4

LGConnection 1.0.4

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
 

  • By
  • Grigory Lutkov

iOS wrapper around AFNetworking makes it easy to use.

Installation

With source code

Podfile

platform :ios, '6.0'
pod 'LGConnection', '~> 1.0.0'

Usage

In the source files where you need to use the library, import the header file:

#import "LGConnection.h"

Initialization

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.

More

For more details see LGConnection.h

License

LGConnection is released under the MIT license. See LICENSE for details.