Home Features Docs Blog Support GitHub

Creating a WebView using Kotlin and Storyboard

Hi There,

I’m having trouble to create a web view screen on a Kotlin moe project.
I followed the outdated tutorial: https://software.intel.com/en-us/node/633259
but without success.
Could you please tell how to create a Webview using storyboard (with proper outlet settings) then how to set an url from android studio.



After created moe “Kotlin > Single View Application”, please following steps:

  • Add the following code in the AppViewController.kt :
override fun viewDidLoad() {

        val urlString = "http://sourcefreeze.com"
        val url = NSURL.URLWithString(urlString)
        val nsurlRequest = NSURLRequest.requestWithURL(url)

    external fun webView(): UIWebView
  • Add App Transport Security settings to info.plist :


  • Select “Multi-OS Engine Action -> Generate Actions and Outlets for Interface Builder”

  • Select “Multi-OS Engine Actions - > Open Project in Xcode”

  • Drag and Drop ‘UIWebView’ into ‘UIViewController’, and add missed constraints.

  • Open up “moe-main-interfaces.m” in the Assistant Editor and connect WebView into IBOutlet :

@property (strong) IBOutlet UIWebView* webView;
  • Close Xcode project

  • Build and run the application. You should see the content at our requested http://sourcefreeze.com loaded into the UIWebView.

Best Regards,

1 Like


Full sample project:
KotlinWebView.zip (67.1 KB)

1 Like

Thanks a ton Vighr!!
I will give it a try

You guys are doing a great job!! :smile:


Thanks, It works like a charm!

@vighr, Thanks for the previous sample. Do you have an another example/sample using the new WKWebView?