无法在 ios 9.0 的 UIWebView 中打开 URL

Cannot open URL in UIWebView in ios 9.0

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

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.

我已经尝试了给定的方法 但我在控制台收到相同的错误报告

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

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