xcode 错误消息:[MC] 从公共有效用户设置中读取 & [MC] systemgroup.com.apple.configurationprofiles 路径的系统组容器是
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42476012/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error message : [MC] Reading from public effective user settings & [MC] System group container for systemgroup.com.apple.configurationprofiles path is
提问by ΩlostA
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 :
[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];
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 ?
我确切地说 connectionDidFinishLoading: 没有被调用,但是如果我在没有 sendAsynchronousRequest: 的情况下直接启动它,它就可以工作。那么为什么我使用 sendAsynchronousRequest: 函数的事实让我出现了两个错误消息,以及 connectionDidFinishLoading 的错误调用?
Thank you in advance.
先感谢您。
回答by Lim
It occurs to me. The same logs in console when I use textField. Follow is my operation:
它发生在我身上。当我使用 textField 时,控制台中的日志相同。以下是我的操作:
- From Xcode menu open: Product > Scheme > Edit Scheme
- On your Environment Variables set OS_ACTIVITY_MODE in the value set disable
- 从 Xcode 菜单打开:产品 > 方案 > 编辑方案
- 在您的环境变量中设置 OS_ACTIVITY_MODE 的值设置为禁用
I solved it thanks to thisdiscussion.
由于这个讨论,我解决了它。