views:

47

answers:

1

My problem is that I am both new to iPhone development and also to using this HTTPRiot class. The goal is to have a generic XML parser and this class seems to do the trick from the completed demos, but what I haven't been able to find is a barebones implementation tutorial.

What I'm not seeing is the delegate methods being invoked on the class I make. From what I have gathered the header must have an include for our delegate's header:

#include <HTTPRiot/HTTPRiot.h> 

and in the implementation file I have a number of the functions that are supposed to be called when we parse the XML

- (void)restConnection:(NSURLConnection *)connection didReturnResource:(id)resource object:(id)object
{
NSLog(@"didReturnResource");
}

- (void)restConnection:(NSURLConnection *)connection didReceiveResponse:(NSHTTPURLResponse *)response object:(id)object
{
NSLog(@"didReceiveResponse");
}

- (void)restConnection:(NSURLConnection *)connection didFailWithError:(NSError *)error object:(id)object
{
NSLog(@"didFailWithError - %",[error description]);
}

- (void)restConnection:(NSURLConnection *)connection didReceiveError:(NSError *)error response:(NSHTTPURLResponse *)response object:(id)object
{
NSLog(@"didReceiveError - %",[error description]);
}

- (void)restConnection:(NSURLConnection *)connection didReceiveParseError:(NSError *)error responseBody:(NSString *)stringBody 
{
    NSLog(@"didReceiveParseError - %",[error description]);
NSLog(@"%",stringBody);
}

When I try to initialize the class, I don't get any of these called. Can someone point me to a tutorial that takes you through using this class from beginning to end?

Thanks,

liam

Edited 8/19/2010 to be more descriptive.

A: 

Hello, I had the same problem and found that inside the original project at github, they have a sample iPhone application, just by replacing the files in a dummy project you can learn how to use the framework. This is the url to the sample app:

http://github.com/Caged/httpriot/tree/master/Source/iPhoneSampleApp/

Hope it's still helpful.

iPhoneDevProf