Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Issues with Safari dev tools + WKWebView + local URL + iOS 18 simulator

When I'm inspecting a WKWebView in a simulator and the WKWebView loads a local URL with a port number, I've found that most features of Safari dev tools that worked in iOS 17 are broken in iOS 18. Here are the steps I'm taking:

  1. Set up a WKWebView with isInspectable = true that loads a local URL, e.g. https://www.local.mydomain.com:3000
  2. Install a self-signed SSL certificate on a simulator for www.local.mydomain.com
  3. Run my app on the simulator
  4. The WKWebView loads successfully
  5. In Safari on my Mac, I can select the WKWebView and open dev tools to inspect it

If the simulator is on iOS 17, this works fine, no issues.

But if the simulator is on iOS 18, Safari dev tools are mostly broken. I can tell that there is a connection to the WKWebView because the Network tab logs the requests that I expect. But I cannot use any of the other dev tools features: Elements, Sources, Console, etc.

Has anyone else encountered this? Is there a workaround?

Also if the simulator is on iOS 18 and the WKWebView loads an external URL, it's fine. As far as I can tell, the issues are only with a local URL

Answering my own question. The issue:

  • Affects both WKWebView and Safari
  • Is not specific to iOS 18
  • Does not affect just local URLs; I can reproduce it during a port forwarding session to an external domain

How to reproduce with Nextjs which is the framework I'm using:

  1. Install a self-signed certification for a domain like
  2. Start a Nextjs dev server
  3. Open any page in the Nextjs dev server in Safari on a Simulator
  4. Open Safari Dev Tols

The Elements tab will be either empty or show only the very top level elements of the DOM. The Network and Sources tab will show a correct list of resources that have been loaded but won't show the responses as you'd normally see.

I've also been having this issue, it sounds like a pretty identical situation. I'm using inspectable webviews loading a Nextjs dev server and Safari dev tools on the webviews have also stopped working for me since December. I've not been able to tie the issue to any code changes as I've tried checking out multiple old commits I know used to be fine and they also don't work with dev tools anymore.

Issues with Safari dev tools + WKWebView + local URL + iOS 18 simulator
 
 
Q