何らかの理由で、を実行したときにエラーが存在しない場合にエラーが発生しますNSURLConnection
。
NSLog(@"Sending string to server. ID:11118");
NSData *urlData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
NSLog(@"Response from server received. ID:11119");
NSString *responseString = [[NSString alloc]initWithData:urlData encoding:NSUTF8StringEncoding];
if (&error)
{
//Handle Error
NSLog(@"Error getting a server response! (scm) Error %i: %@", [error code], [error localizedDescription]);
UIAlertView *theAlert = [[UIAlertView alloc]initWithTitle:@"Error getting a server response!" message:[NSString stringWithFormat:@"Error %i: %@", [error code], [error localizedDescription]] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[theAlert show];
}
表示と表示でアラートを[error code]
表示0
しています。[error localizedDescription]
Null
何か案は?