ios - 错误信息 : [MC] Reading from public effective user settings & [MC] System group container for systemgroup. com.apple.configurationprofiles 路径是

标签 ios objective-c xcode nsurlconnection sendasynchronousrequest

当我使用以下代码时,出现错误消息:

[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 菜单打开:产品 > 方案 > 编辑方案
  • 在您的环境变量中将 OS_ACTIVITY_MODE 的值设置为禁用

感谢this,我解决了这个问题讨论。

关于ios - 错误信息 : [MC] Reading from public effective user settings & [MC] System group container for systemgroup. com.apple.configurationprofiles 路径是,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42476012/

相关文章:

objective-c - 从使用中央调度的单独 DataController 类填充 ViewController 类中的 UITableView

iphone - UIImagepickercontroller-视频超过10分钟问题-IOS

swift - 使用 Swift 5 在 Firestore 中获取字段的旧值

xcode - XCode 5 中的 Core Data - 手动安装以及如何安装?

objective-c - 在 plist 中更新和保存数据

iOS - [WKWebView .cxx_construct] 只能在主线程中使用

objective-c - 将 View 层次结构绘制到 Cocoa 中的特定上下文中

objective-c - 如何确定 NSString 的第一个字符是否为字母

ios - 键盘隐藏通知调用多次

ios - Xcode:momc 无法在旧项目中编译 .mom 文件