title: Simplest webview app in iOS - fail to run
body: <p>I am trying to make an ios app that simply open a URL. So basically a webview app. I am using XCode 12.4 and that's what I did:</p>
  <ol>
  <li>Create new project-&gt;iOS App --&gt; (see image below)</li>
  <li>Create a new file: <code>ViewController.swift</code> --&gt;</li>
  </ol>
  <pre><code>import WebKit
  class WebViewController: UIViewController, WKNavigationDelegate {
  
      var webView: WKWebView!
      
      override func loadView() {
          webView = WKWebView()
          webView.navigationDelegate = self
          view = webView
      }
      
      override func viewDidLoad() {
          super.viewDidLoad()
          let url = URL(string: &quot;https://developer.apple.com&quot;)!
          webView.load(URLRequest(url: url))
      }
  }
  </code></pre>
  <ol start="4">
  <li>Build and Run.</li>
  </ol>
  <p>The issue is that the app continues to open on &quot;Hello World&quot; and I imagine the reason is that the <code>MyappApp.swift</code> file is calling <code>ContentView</code> instead of <code>ViewController</code></p>
  <pre><code>import SwiftUI
  
  @main
  struct myappApp: App {
      var body: some Scene {
          WindowGroup {
              ContentView()
          }
      }
  }
  </code></pre>
  <p>How can I fix this?</p>
  <p><strong>Disclaimer</strong>: This is my first iOS app and I know little to nothing about iOS dev.</p>
  <p><a href="https://i.stack.imgur.com/LIdWr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LIdWr.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/kztYz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kztYz.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/vwyg3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vwyg3.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/7PzNn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7PzNn.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/6cQ8y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6cQ8y.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/XOzpB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XOzpB.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/Gu4py.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gu4py.png" alt="enter image description here" /></a></p>