All Products
Search
Document Center

Mobile Platform as a Service:Custom WebView base class

Last Updated:Aug 22, 2025

The default webView class of the container is H5WKWebView. The steps to customize the webView class are as follows:

  1. The custom webView class must inherit H5WKWebView.

    image

  2. In the- (void)application:(UIApplication )application afterDidFinishLaunchingWithOptions:(NSDictionary )launchOptions of DTFrameworkInterface, set the base class for the WebView container.

    image

    Sample code:

    [MPNebulaAdapterInterface shareInstance].nebulaWebViewClass = NSClassFromString(@"MPH5WKWebView");