无法在iOS 9.0的UIWebView中打开URL [英] Cannot open URL in UIWebView in ios 9.0

查看:66
本文介绍了无法在iOS 9.0的UIWebView中打开URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在UIWebView-中打开URL时收到以下消息

I get the following message when i try to open a URL in UIWebView-

由于应用传输安全性不安全,因此它阻止了明文HTTP(http://)资源加载.可以通过您应用的Info.plist文件配置临时例外.

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

我已经尝试过此处但我在控制台上得到了相同的错误报告

I already tried the method given here but I get the same error report at the console

推荐答案

NSAppTransportSecurity 添加到info.plist,数据类型为Dictionary,然后添加一项 NSAllowsArbitraryLoads 是布尔值,并将其设置为YES,然后重新启动Xcode项目并运行.

NSAppTransportSecurity add to info.plist , data type is Dictionary, then add an item NSAllowsArbitraryLoads , which is boolean value and set it to YES, then restart the Xcode project and run.

NSAppTransportSecurity :- 包含用于覆盖默认App Transport Security行为的设置的字典.应用程序的Info.plist文件的顶级键.

NSAppTransportSecurity: - A dictionary containing the settings for overriding default App Transport Security behaviors. The top level key for the app’s Info.plist file.

这篇关于无法在iOS 9.0的UIWebView中打开URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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