Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WKWebView on macOS #161

Closed
wants to merge 3 commits into from
Closed

Use WKWebView on macOS #161

wants to merge 3 commits into from

Conversation

dragonx
Copy link

@dragonx dragonx commented Apr 13, 2017

You probably don't want to take this commit, because it has some severe regression in functionality, but I have a problem with the current implementation since I can't connect the Safari debugger.

My main target is iOS and Android. We use the Unity player on macOS. This build "breaks" the webview in the unity player, however, it'll launch the webview in a separate window, and this allows us to right click on the webview and bring up the Safari debugger, which helps a lot during development.

This works for iOS.  Trying to get it to work on macOS, but this doesn't
work yet.  WKWebKit doesn't appear to be available for 32-bit macOS, so
remove those builds.
Ultimately this won't work because cacheDisplayInRect doesn't work on
WKWebView.  Will keep plowing away to make a separate window for the
WebView.
This spins up the webview in a separate window.  It leaves a blank
placeholder inside the player where the webview is positioned.

This also allows for devtools to connect to the webview.  Right click on
the webview and use "Inspect Element".
@KojiNakamaru
Copy link
Member

Thank you for this interesting pull-request. About WKScriptMessageHandler, it can coexist with the current code and I would like to merge it. About a separate window, it breaks the current behavior as you noted and it also requires a 64-bit build, so cannot be merged directly. I'll try to make a separate package for 64-bit which contains your modification and a user can choose it if necessary.

@KojiNakamaru
Copy link
Member

I've imported your code in #162 . Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants