I created a web view controller and it loads https sites(ex: , ) but not http, non ssl secured sites(ex: http://bswd.us, http://www.barretthillins.com). When i do put a hhtp site in there, it does load but just a blank, white web view. How would i need to fix this?
As of iOS 12.0, 'UIWebView' has been explicitly marked as deprecated. Apple is encouraging developers to adopt WKWebView instead, which was introduced in iOS 8.0.
Unlike UIWebView, which does not support server authentication challenges, WKWebView does. In practical terms, this means that when using WKWebView, you can enter site credentials for password-protected websites.
Android is powered by Chrome. Mobile Safari UIWebView. The UIWebView is different from the ordinary Safari browser, as it is not a stand-alone browser, but merely browser functionality that is embedded in a third party app that allows the app to display content from the web.
What is UIWebView? UIWebView is a deprecated iOS user interface control in Apple's UIKit framework. It loads HTML files and web content into an app view, rendering them as they would appear in a browser window. See developer.apple.com/documentation/uikit/uiwebview.
This is due to the App Transport Security, a new protocol introduced by Apple at WWDC 2015. It doesn't allow any connections that are not HTTPS
. You can disable it, however it's not recommended as it secures your app.
To disable it you have to edit the App's .plist
. Simply right-click the .plist
file and select Open As -> Source File and add the following code:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/>
</dict>
This will allow HTTP
requests.
Hope that helps, Julian.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With