Skip to content

layered-pieces/LAPWebServiceReachabilityManager

Repository files navigation

LAPWebServiceReachabilityManager

LAPWebServiceReachabilityManager pings a web service with a given time interval to check it's reachability.

Installation

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

pod "LAPWebServiceReachabilityManager"

Usage

NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://google.de"]];

LAPWebServiceReachabilityManager *reachabilityManager = [[LAPWebServiceReachabilityManager alloc] initWithURLRequest:request timeInterval:5.0];
[reachabilityManager addStatusObserver:^(LAPWebServiceReachabilityManager *manager, LAPWebServiceReachabilityStatus status) {
    NSLog(@"Reachabiliy changed");
}];

About

A reachability observer for web services

Resources

License

Stars

Watchers

Forks

Packages

No packages published