Latest 1.3.3
License MIT
Platforms ios 7.0, requires ARC

CI Status

A simple infrastracture to retrieve requested data and transform it to content object.


Say you want to get and parse a JSON resource to show its entries inside a table view. You should isolate that fetch in a dedicated class not to pollute you view controller.

@interface DucksFetch : MUKContentFetch<NSArray<Duck *> *>

@implementation DucksFetch

- (void)retrieveResourceWithCompletionHandler:(void (^)(MUKContentFetchStepResultType resultType, id retrievedObject, NSError *error))completionHandler
    dispatch_async(myQueue, ^{
        NSData *JSONData = ...;
        completionHandler(MUKContentFetchStepResultTypeSuccess, JSONData, nil);

- (void)transformRetrievedObject:(id)retrievedObject withCompletionHandler:(void (^)(MUKContentFetchStepResultType resultType, id transformedObject, NSError *error))completionHandler
    dispatch_async(myQueue, ^{
        NSArray *ducks = ParseDucks(retrievedObject);
        completionHandler(MUKContentFetchStepResultTypeSuccess, ducks, nil);


To get data is now simple and clean.

DucksFetch *fetch = [[DucksFetch alloc] init];
[fetch startWithCompletionHandler:^(MUKContentFetchResponse *response) {
    self.ducks = response.object;
    [self updateUI];

Obviously this is a small and incomplete example which does not mind about cancellation and error handling, two things you have (almost) for free using MUKContentFetch.


  • iOS 7 SDK.
  • Minimum deployment target: iOS 7.


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

pod "MUKContentFetch"


Marco Muccinelli, [email protected]


MUKContentFetch is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "MUKContentFetch",
    "version": "1.3.3",
    "summary": "Retrieve data and transform it to content objects",
    "description": "A simple infrastracture to retrieve requested data and transform it to content object",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Marco Muccinelli": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.3.3"
    "platforms": {
        "ios": "7.0"
    "requires_arc": true,
    "source_files": "Classes/**/*.{h,m}"

Pin It on Pinterest

Share This