I had another project that was thinking about the project, but then I just created a WebView project and there was also such an error. (the main project works fine, but it will crash when you switch to the controller from the WebView) pls help will be very grateful!

import UIKit import WebKit class ViewController: UIViewController { @IBOutlet weak var webbView: WKWebView! override func viewDidLoad() { super.viewDidLoad() let url1 = URL(string: "https://www.mail.ru/") webbView.load(URLRequest(url: url1!)) } } 

    1 answer 1

    On the project settings screen, in the Target section at the very bottom of Linked Framework and Libraries, you must click the plus sign and add WebKit.framework.

    • I tried, it still crashes, on optional I also set it to crash - Aktilek Turatbekov
    • Before answering, I, of course, created a test project and checked that nothing collapses after adding WebKit.framework - Sergnsk 2:07 pm