无法在iOS 9.0的UIWebView中打开URL

编程入门 行业动态 更新时间:2024-10-06 20:26:03
本文介绍了无法在iOS 9.0的UIWebView中打开URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

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

App Transport Security has blocked a cleartext 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

本文发布于:2023-11-26 21:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635323.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:iOS   URL   UIWebView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!