7

当我使用下面的代码,我有错误消息:错误消息:从公共有效的用户设置&[MC]雷丁[MC]为systemgroup.com.apple.configurationprofiles路径系统组容器是

[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. 

的〔自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的失误?

预先感谢您。

回答

23

它发生在我身上。当我使用textField时,在控制台中使用相同的日志。按照我的操作:

  • 从Xcode的菜单中打开:产品>方案>编辑方案
  • 在中设置禁用值设置OS_ACTIVITY_MODE环境变量

我解决这得益于this讨论。

相关问题