UIWebview for macOS solution?


Hi I was trying to use Webview on macosx. I noticed that the experimental webview class only works for ios and android, is there a reason the macOS does not have a webview class?

I was wondering has anyone found an alternative/workaround or made a macos variant or anything similar, just wondering before i took the time to design a solution.

Cocos2d is mostly a mobile game engine, so it’s probably that no one has done the work to implement it yet. If you haven’t released your game for macOS yet you may want to consider Mac Catalyst instead so you can just use the iOS (which uses [WKWebView])(https://developer.apple.com/documentation/webkit/wkwebview).

If you don’t need the web view to overlay your game you could always send a URL to the external Safari app using Application::openURL.

If you want to write the macOS version of UIWebView then you can use AppKit: https://developer.apple.com/documentation/webkit/webview.

1 Like

Thank you! :blush:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.