Closed rainmaker2k closed 12 years ago
Its been deprecated in favour of AFNetworking it seems.
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:
self.page = self.page + 1;
NSString *formatString = AppConfig(@"SearchURLFormat");
NSString *escaped = [[self class] escapeQueryParameter:query];
NSURL *searchURL = [NSURL URLWithString:[NSString stringWithFormat:formatString, escaped, self.page]];
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.
Thanks, all - this should be addressed. Closing this issue; if the problem continues please let us know
NINetworkRequestOperation doesn't seem to be available anymore in the nimbus library.