<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 11, 2014, at 12:10 PM, Joseph Pecoraro <<a href="mailto:pecoraro@apple.com" class="">pecoraro@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Aug 11, 2014, at 3:23 AM, Koen Bok <<a href="mailto:koen@madebysofa.com" class="">koen@madebysofa.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><span style="font-family:arial,sans-serif;font-size:13px" class="">I am looking how to show the inspector in my own mac desktop app with WKWebViews.</span></div></div></blockquote><div class=""><br class=""></div><div class="">You are correct that currently the only supported way to inspect a WKWebView is through Safari with an entitlement in your app (see the WWDC talk for more information).</div><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div dir="ltr" class=""><div style="font-family:arial,sans-serif;font-size:13px" class="">I think I need to initialize an XPC or http connection to a WKWebView and pass it to a new inspector instance, and then show it.</div><div style="font-family:arial,sans-serif;font-size:13px" class="">
<br class=""></div><div style="font-family:arial,sans-serif;font-size:13px" class="">Can anyone maybe point me in the right direction?</div></div></blockquote><div class=""><br class=""></div><div class="">From a WebKit Internals perspective, you just need to enable WebCore's Settings::developerExtrasEnabled setting to get what you want. No XPC/HTTP connections necessary.</div><div class=""><br class=""></div><div class="">The WKWebView API allows toggling WebCore's Settings via the WKPreferences interface (available on WKWebViewConfiguration). Nothing currently exists for the developer extras setting. It should be easy to add plumbing for a new setting to toggle the Developer Extras Enabled setting at least as a private API.</div></div></div></div></blockquote><div><br class=""></div><div>I filed and put a patch up on:</div><<a href="https://webkit.org/b/135811" class="">https://webkit.org/b/135811</a>> Add Private WKPreferences API for developer extras (show inspector)<br class=""><br class=""></div><div>- Joe</div></body></html>