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

MacOS UI Empty/No Display #4

Closed
gismofx opened this issue Nov 22, 2020 · 11 comments
Closed

MacOS UI Empty/No Display #4

gismofx opened this issue Nov 22, 2020 · 11 comments

Comments

@gismofx
Copy link
Contributor

gismofx commented Nov 22, 2020

I just want to document/capture this in a separate issue.

If webview_sharp is cross platform, why does this example not work on MacOS?

Have you successfully tried the webview_sharp examples on MacOS?
Webview Sharp examples

@congzhangzh
Copy link
Owner

congzhangzh commented Nov 22, 2020

Maybe the native depend part need recompile as Mac OS X keep updating.

BTW, if the upstream stop trace the native part, I prefer some more light way, which is easy to manager, like webwindow's implement, which point in SteveSandersonMS/WebWindow#127

The best result is that microsoft will release WebView2 cross platform, I think there is no barrierfor webview2 team, and they will do that in a near future, you can follow MicrosoftEdge/WebView2Feedback#645

Have you successfully tried the webview_sharp examples on MacOS?
Webview Sharp examples

I can give a try laterly.

@gismofx
Copy link
Contributor Author

gismofx commented Nov 25, 2020

@congzhangzh It will be great if/when WebView2 is cross platform...

Maybe it does need to be compiled on MacOS for it to work, but here are the precompiled libs, maybe these will work for MacOS when compiling from windows.

https://github.com/webview/webview_csharp/tree/master/libs

@congzhangzh
Copy link
Owner

@gismofx I test on my mbp, it works

@gismofx
Copy link
Contributor Author

gismofx commented Nov 25, 2020

@gismofx I test on my mbp, it works

That's good. Was it compiled on Windows and transferred to mbp or compiled on mbp?

@congzhangzh
Copy link
Owner

congzhangzh commented Nov 25, 2020 via email

@gismofx
Copy link
Contributor Author

gismofx commented Nov 25, 2020

It seems it just works, I just use dotnet run

From the MBP?

@congzhangzh
Copy link
Owner

congzhangzh commented Nov 25, 2020 via email

@gismofx
Copy link
Contributor Author

gismofx commented Nov 25, 2020

Does your Blazor example run too?

@gismofx
Copy link
Contributor Author

gismofx commented Jan 15, 2021

@congzhangzh I compiled and tried to run from a mac( Using VS for Mac), but I get no window or display. Is there something I need to do to get it to work on mac?

@congzhangzh
Copy link
Owner

@gismofx seems works now, you can have a try, I do some adjust according to https://github.com/webview/webview_csharp

using(var webview = new Webview())
{
    webview
        .SetTitle("The Hitchhicker")             
        .SetSize(1024, 768, WebviewHint.None)
        .SetSize(800, 600, WebviewHint.Min)
        .Navigate(new UrlContent("https://en.wikipedia.org/wiki/The_Hitchhiker%27s_Guide_to_the_Galaxy_(novel)"))
        .Run();
}

@gismofx
Copy link
Contributor Author

gismofx commented Jan 15, 2021

@congzhangzh This worked on mac! Thank you! I was also successful in publishing and launching as well via dotnet command in terminal.

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

No branches or pull requests

2 participants