WKWebView not loading webpage - renders blank screen in Swift
I have found the solution. The problem was being caused by AVG AntiVirus's webshield. For some reason AVG webshield treats all network communication from the simulator as fraudulent.
The following screenshot shows the safari app running on simulator. It says that www.apple.com is not safe or any other website.
The following screenshot is from system.log showing errors with webkit.
You can replicate this problem by installing AVG antivirus and turning on the webshield. WKWebview in your App(On the simulator) wouldn't load anything.
I don't understand why it wasn't working on an actual device tho. It could have been another problem with the device. I also deleted the derived data folder, the actual app and had restarted the device.
Thank you everybody for the answers and help.
WKWebView showing white screen, with native-webview communication
You missed the line
Adding it to the end of viewDidLoad method should fix your issue.
Ios: How to Make a Shadow for Uiview on 4 Side (Top,Right,Bottom and Left)
Converting Nsstring to Nsdate (And Back Again)
Exc_Bad_Access Signal Received
How to Easily Resize/Optimize an Image Size With Ios
Number of Days Between Two Nsdates
How to Change the Background Color of a Uibutton While It's Highlighted
How to Enable File Sharing For My App
Play Youtube Videos With Mpmovieplayercontroller Instead of Uiwebview
How to Add Text to an Image in iOS Swift
Wkwebview Not Loading Webpage - Renders Blank Screen in Swift
Iphone 6 and 6 Plus Media Queries
Attempt to Present Uiviewcontroller on Uiviewcontroller Whose View Is Not in the Window Hierarchy
How to Force a Uiviewcontroller to Portrait Orientation in iOS 6
How to Make a Clickable Link in an Nsattributedstring
How to Have Stored Properties in Swift, the Same Way I Had on Objective-C