Latest 0.1.1
Homepage https://github.com/layered-pieces/LAPReliableSessionManager
License MIT
Platforms ios 9.0, tvos 9.0, watchos 2.0, requires ARC
Dependencies AFNetworking, LAPWebServiceReachabilityManager
Authors

If you want to send data packages to a web service in a reliable way, with guaranteed delivery. LAPReliableSessionManager builds on top of AFNetworking and LAPWebServiceReachabilityManager. It first saves data packages to disk and then synchronizes them in a FIFO manner, one at a time.

Installation

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

pod "LAPReliableSessionManager"

Usage

LAPWebServiceReachabilityManager *reachabilityManager = ...;
AFHTTPSessionManager *sessionManager = ...;

LAPReliableSessionManager *offlineStorage = [[LAPReliableSessionManager alloc] initWithService:@"de.layered-pieces.offline-storage" sessionManager:sessionManager reachabilityManager:reachabilityManager];

NSMutableURLRequest *request = [offlineStorage POST:@"/v1/endpoint" parameters:@{ @"json": @"dictionary" }];
[offlineStorage savePackage:request completion:^(NSURLRequest * _Nonnull request, NSURLResponse * _Nullable response, NSError * _Nullable error) {
    // delivery complete
}];

Latest podspec

{
    "name": "LAPReliableSessionManager",
    "version": "0.1.1",
    "summary": "Send data packages in a reliable way, with guaranteed delivery",
    "description": "If you want to send data packages to a web service in a reliable way, with guaranteed delivery.",
    "homepage": "https://github.com/layered-pieces/LAPReliableSessionManager",
    "license": "MIT",
    "authors": {
        "Oliver Letterer": "[email protected]"
    },
    "social_media_url": "https://twitter.com/OliverLetterer",
    "source": {
        "git": "https://github.com/layered-pieces/LAPReliableSessionManager.git",
        "tag": "0.1.1"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "9.0",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "source_files": "LAPReliableSessionManager",
    "dependencies": {
        "AFNetworking": [
            "~> 3.0"
        ],
        "LAPWebServiceReachabilityManager": [
            "~> 0.1"
        ]
    }
}

Pin It on Pinterest

Share This