I'm trying to adopt SwiftUI after previously using frameworks like PySide and PyQt. I'm bewildered at the fact that one of the the most common tasks and programming examples of incorporating a Browser into one's app is missing a working, authoritative version from whatever google has managed to find over the entire Apple developer web presence. Actually, as a fan of the platforms and the development facilities, it saddens me.
This is one of the more common examples in Qt/PyQt/PySide/PyGTK/Flutter here.
The examples that do exist seem to have the following issues: Mismatch with latest version of Xcode / Catalyst
Uses "classic" storyboard workflow (doesn't seem to be compatible with the new SwiftUI declarative paradigm )
Mixes Obj-C code and not suited for latest versions of Xcode and iOS
Otherwise only work on iOS to a varying degree of success.
Can someone from the apple developer support provide us with a canonical, annotated, straightforward example for incorporating a WebView into the new SwiftUI non storyboard, non UIViewController (which gives scope errors in the new paradigm for good reason) that can be added as a view in the "multiplatform app" target in latest Xcode?
Many thanks!
(this has the UIViewController issue https://developer.apple.com/documentation/webkit/wkwebview)
Selecting any option will automatically load the page