CoreNetworking 1.0.7

CoreNetworking 1.0.7

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Feb 2016

Maintained by Gabriel Massana.



  • By
  • Gabriel Massana

CoreNetworking-iOS

Wrapper project to simplify NSURLSession.

How to Install it

Podfile

platform :ios, '8.0'
pod 'CoreNetworking', '~> 1.0'

Old school

Drag into your project the folder /CoreNetworking-iOS. That's all.

Example

#import "CNMSession.h"
#import "CNMRequest.h"
#import "CNMURLSessionDataTask.h"

...

    CNMRequest *request = [[CNMRequest alloc] init];
    request.URL = [NSURL URLWithString:@"http://exampleapi.com/json"];

    CNMURLSessionDataTask *task = [[CNMSession defaultSession] dataTaskFromRequest:request];

    task.onCompletion = ^void(NSData *data, NSURLResponse *response, NSError *error)
    {
        if (!error)
        {
            // Raw data to JSON.
            NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data
                                                                 options: NSJSONReadingMutableContainers
                                                                   error: nil];
        }
        else
        {
            NSLog(@"error %@", error);
        }
    };

    [task resume];

License

ButtonBackgroundColor-iOS is released under the MIT license. Please see the file called LICENSE.

Versions

$ git tag -a 1.0.0 -m 'Version 1.0.0'

$ git push --tags

Author

Gabriel Massana

Found an issue?

Please open a new Issue here if you run into a problem specific to CoreNetworking-iOS, have a feature request, or want to share a comment.