Kiedy użyć następującego kodu, mam komunikaty o błędach:Błąd: [MC] Czytanie z publicznych skuteczne ustawienia użytkownika i [MC] pojemnik grupa System systemgroup.com.apple.configurationprofiles ścieżki jest
[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
}
}];
komunikaty o błędach:
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.
[self requestFunction] funkcja uruchomić prosty wniosek:
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];
Wykreślam, że connectionDidFinishLoading: nie jest wywoływana, ale jeśli uruchomię go bezpośrednio bez sendAsynchronousRequest :, to działa. Dlaczego więc używam funkcji sendAsynchronousRequest: function powoduje, że pojawiają się dwa komunikaty o błędach i błąd połączenia connectionDidFinishLoading?
Z góry dziękuję.