NINetworkRequestOperation not available in WHSearchController #3

rainmaker2k opened this Issue Sep 5, 2012 · 7 comments


None yet

6 participants


NINetworkRequestOperation doesn't seem to be available anymore in the nimbus library.


Its been deprecated in favour of AFNetworking it seems.

JeeLiu commented Sep 7, 2012

NINetworkRequestOperation *op = [[NINetworkRequestOperation alloc] initWithURL:searchURL]; NINetworkRequestOperation doesn't find


Same issue here...


Same issue and I was unable to find any information regarding this in their documentation.


You can migrate the functions that use NINetworkRequestOperation to use AFNetworking which is the default in Nimbus now:

ex: = + 1;
    NSString *formatString = AppConfig(@"SearchURLFormat");
    NSString *escaped = [[self class] escapeQueryParameter:query];
    NSURL *searchURL = [NSURL URLWithString:[NSString stringWithFormat:formatString, escaped,]];
    DebugLog(@"Search URL = %@", searchURL);
    NSURLRequest *request = [NSURLRequest requestWithURL:searchURL];
    AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
        id results = [JSON objectForKey:@"results"];
        if (results && [results respondsToSelector:@selector(objectAtIndex:)]) {
            if (self.results) {
                self.results = [self.results arrayByAddingObjectsFromArray:results];
            } else {
                self.results = results;
            [self.delegate searchControllerDidFindResults:self];

    } failure:^(NSURLRequest *request, NSHTTPURLResponse *response,NSError *error,id JSON) {
        [self reportError:error];
    [operation start];

Thanks @krishnenc , I'll try that later. Someone should send a Pull Request with these changes.

welschp commented Sep 10, 2012

Thanks, all - this should be addressed. Closing this issue; if the problem continues please let us know

@welschp welschp closed this Sep 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment