Hello,
i'm new to iPhone Programming, so i apologize if i am missing something, or if this was answered somewhere else and I missed it.
So i'm getting the following error when trying to call [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString bytes]: unrecognized selector sent to instance 0x28114'
It should be noted that this line of code does work some of the time, but in this particular request it doesn't work consistently. I'm also new to XCode, so my debugging skills are rudimentary.
The code i'm using is here:
NSURLResponse* response = nil;
NSError* error = nil;
NSData* responseData;
@try
{
responseData = [NSURLConnection sendSynchronousRequest:request
returningResponse:&response
error:&error];
}
@catch (NSException *exception) {
NSLog(@"Caught %@%@", [exception name], [exception reason]);
}
Any help or direction would be most appreciated.
-haider
i'm new to iPhone Programming, so i apologize if i am missing something, or if this was answered somewhere else and I missed it.
So i'm getting the following error when trying to call [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString bytes]: unrecognized selector sent to instance 0x28114'
It should be noted that this line of code does work some of the time, but in this particular request it doesn't work consistently. I'm also new to XCode, so my debugging skills are rudimentary.
The code i'm using is here:
NSURLResponse* response = nil;
NSError* error = nil;
NSData* responseData;
@try
{
responseData = [NSURLConnection sendSynchronousRequest:request
returningResponse:&response
error:&error];
}
@catch (NSException *exception) {
NSLog(@"Caught %@%@", [exception name], [exception reason]);
}
Any help or direction would be most appreciated.
-haider