当我尝试在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
发布评论