I'm working on a macOS app that uses a JSContext and I want to debug it with the Safari Web Inspector.
According to Session 402 at WWDC 2016 the following entitlement is required:
<key>com.apple.webinspector.allow</key>
<true/>
This is easy enough to add, but it causes the app to crash at launch with a code signing issue. The console shows that taskgated-helper is reporting just before the crash:
Unsatisfied entitlements: com.apple.webinspector.allow
For anyone who finds this, here's what you need to know:
https://webkit.org/blog/13936/enabling-the-inspection-of-web-content-in-apps/
Basically, there's now a inspectable
property on both the WKWebView
and JSContext
. Unfortunately, there's no mention of the old entitlement in the WebKit blog post, so it's impossible for folks using the old technique to find.
Hopefully this post will bridge this gap.
It also might be something for @eskimo to add to his (always helpful) code signing documentation.
-ch