错误消息:从公共有效用户设置和系统组容器中读取systemgroup.com.apple.configurationprofilespath为
当我使用下面的代码时,我有错误消息:
[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 } }];
错误消息:
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]函数启动一个简单的请求:
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];
我精确的说,connectionDidFinishLoading:不被调用,但是如果我直接启动它没有sendAsynchronousRequest:,它的工作原理。 那么为什么我使用sendAsynchronousRequest:函数的事实让我看到两个错误消息,以及connectionDidFinishLoading的错误?
先谢谢你。
它发生在我身上。 当我使用textField时,在控制台中使用相同的日志。 遵循是我的操作:
- 从Xcode菜单打开:Product> Scheme> Edit Scheme
- 在您的环境variables中设置值为disable的OS_ACTIVITY_MODE
由于这个讨论,我解决了这个问题。