Cannot open URL in UIWebView in ios 9.0

99封情书 提交于 2019-12-13 07:27:56

问题


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

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


回答1:


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: - A dictionary containing the settings for overriding default App Transport Security behaviors. The top level key for the app’s Info.plist file.



来源:https://stackoverflow.com/questions/33295660/cannot-open-url-in-uiwebview-in-ios-9-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!