5

Apple is requiring all Safari extensions to switch over to "Safari App Extensions" which specifies the backend be written in Swift instead of JavaScript.

To reduce rewriting and duplicating code as much as possible I'd like to run a headless WKWebView that runs my current JavaScript code and have Swift act as a bridge to/from the WKWebView JavaScript. (We can't use the JavaScriptCore module because we require WebKit apis like Window, XMLHttpRequest, localstorage, etc)

Currently I'm getting the following errors when trying to load the WKWebView as headless and I think they have to do with the fact that I'm not adding the view as a subview to anything. see com.apple.WebKit.WebContent drops 113 error: Could not find specified service

2018-12-06 17:36:28.464054-0800 Extension[12768:12452197] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service 2018-12-06 17:36:28.490149-0800 Extension[12768:12452197] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service

If anyone has any experience with Swift, WKWebView, Safari App Extensions, etc. your advice would be greatly appreciated. Thanks for reading!

durbin
  • 61
  • 2

0 Answers0