Problem using a WKWebView to load my site

Hi, i´m trying to use a WKWebView to make an app that could load my site.

I´ve tried to put the ip on an url constant and then make a request on another constant, then i´ve loaded it.

The result is always a blank page (which is not what was suppose to happen).

On the other hand if i try and load other sites like "www.apple.com" or "www.google.com" it works with perfection.

Can you guys help me out, i can´t seem to find the problem.

>I´ve tried to put the ip on an url constant and then make a request on another constant, then i´ve loaded it.


Can you show that code, thanks.

You may not build the URL correctly.

Have you setup App Transport Secutity settings properly? Can't you see any messages on the debug console?

In addition to the other good suggestions on this thread, I’d like to recommend the Web Inspector, which can give you great insight into the web content within a web view.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

hello, i did setup App Transport Security and then i selected the Allow Arbitrary Loads option. I do have output messages on the debug console. This is what i got:


2020-06-09 01:24:34.151002-0700 STK [736.13309] WF: === Starting WebFilter Logging for process STK

2020-06-09 01:24:34.151417-0700 STK [736.13309] WF: _userSettingsForUser : (null)

2020-06-09 01:24:34.151845-0700 STK [736.13309] WF: _WebFilterIsActive returning: NO

I do have output messages on the debug console.

That is just log noise.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks for showing the output.


As far as I see that, your app does not hit the ATS problem. Please check my other reply if it would solve your issue.

Problem using a WKWebView to load my site
 
 
Q