Classes

The following classes are available globally.

  • A WebAppViewController is the canonical way to show WebApps to users.

    Important note: unless you call ensureWebViewInstantiated(), the web app is not created until the view controller is added to the view hierarchy! If you want to start loading the page before you show it to the user, call that method.

    Simplest possible view controller:

    class SimplestExampleWebAppViewController: WebAppViewController {
    
        override func createWebApp() -> WebApp { return SimplestExampleWebApp() }
    
        override func viewDidLoad() {
            // optional:
            // self.loggingDelegate = myWebAppViewControllerLoggingDelegate
    
            super.viewDidLoad()
            self.loadWebAppInitialURL()
        }
    
    }
    
    See more

    Declaration

    Swift

    public class WebAppViewController: UIViewController, WKScriptMessageHandler