Xcode 8,iOS 10 - “开始WebFilter记录进程” [英] Xcode 8, iOS 10 - "Starting WebFilter logging for process"

查看:2338
本文介绍了Xcode 8,iOS 10 - “开始WebFilter记录进程”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< pre class =snippet-code-html lang-html prettyprint-override> WF:===启动进程的WebFilter日志记录Test2016-09-30 08:56:45.458007测试[616:142557] WF :_userSettingsForUser mobile:{filterBlacklist =(); filterWhitelist =(); restrictWeb = 1; useContentFilter = 0; useContentFilterOverrides = 0; whitelistEnabled = 0;} 2016-09-30 08:56:45.458437测试[616:142557] WF:_WebFilterIsActive返回:否



我在xcode 8,iOS-10中的调试器中收到此警告,当我使用UIWebView Delegate方法加载某些东西时。我没有在Apple网站上找到有关此Web过滤器Active / De-active模式的任何文档。虽然它在我现有的webView功能中没有造成任何问题,即使我在我的webView中运行了一些javascript函数也完成了方法。但仍然很想知道这个新功能的更多信息。



任何有关此功能的建议都将不胜感激。

解决方案

根据对Apple而言,Safari 10中支持的内容安全策略(CSP)已通过包含该标准的2.0版而得到增强。看来此功能还包括 iOS 10



有关详细信息,请查看此处有关CSP级别的信息:


注意:调试设备中的代码时,请取消选中此选项,因为NSLog语句不会显示在控制台中。



    WF: === Starting WebFilter logging for process Test
2016-09-30 08:56:45.458007 Test[616:142557] WF: _userSettingsForUser mobile: {
    filterBlacklist =     (
    );
    filterWhitelist =     (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
}
2016-09-30 08:56:45.458437 Test[616:142557] WF: _WebFilterIsActive returning: NO

I am receiving this warning in my debugger in xcode 8, iOS-10, when I using UIWebView Delegate methods to load something. I didn't find any documentation in Apple website about this web filter Active/De-active mode. Though it's not causing any problem in my existing webView functionality even I am running some javascript function in my webView did finished method. But still curious to know more about this new feature.

Any suggestion about this feature will be appreciate.

解决方案

According to Apple, the "Content Security Policy(CSP)" which support in Safari 10 has been enhanced by including version 2.0 of the standard. It seems that this feature includes in iOS 10 as well.

For more information please look here about the CSP levels: https://content-security-policy.com

OR

Check the site with Chrome Developer Tools and you will find most likely a warning like Mixed Content: The page at '...' as loaded over HTTPS, but requested an insecure resource '...'. This content should also be served over HTTPS.


And If you want to remove the message on the XCode's console then, please find the below steps.

  1. Select Product => Scheme => Edit Scheme or use shortcut : CMD + <
  2. Select the Run option from left side.
  3. On Environment Variables section, add the variable OS_ACTIVITY_MODE = disable

For more information please find the below GIF representation.

Note : While debug the code in device, please unchecked this option as the NSLog statement do not show in the console.

这篇关于Xcode 8,iOS 10 - “开始WebFilter记录进程”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆