When I use the following code, I have error messages :
[NSURLConnection sendAsynchronousRequest:request queue:myQueue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"response status code: %ld, error status : %@", (long)[httpResponse statusCode], error.description);
if ((long)[httpResponse statusCode] >= 200 && (long)[httpResponse statusCode]< 400)
{
// do stuff
[self requestFunction]; //Web Service
}
}];
Error messages :
2017-02-27 01:13:30.088641 RENAULT[210:12313] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-02-27 01:13:30.090449 RENAULT[210:12313] [MC] Reading from public effective user settings.
The [self requestFunction] function launch a simple request :
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] init];
NSString *url_string = [bytes stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
[request setURL:[NSURL URLWithString:[set_send_order stringByAppendingString: url_string]]];
[request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];
[request setTimeoutInterval:timeOut];
[NSURLConnection connectionWithRequest:request delegate:self];
I precise that the connectionDidFinishLoading: is not called, but if I launch it directly without the sendAsynchronousRequest:, it works. So why the fact that I use sendAsynchronousRequest: function makes me appear the two error messages, and the miscalling of the connectionDidFinishLoading ?
Thank you in advance.
It occurs to me. The same logs in console when I use textField. Follow is my operation:
I solved it thanks to this discussion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With