Fixed the issue. Following are the to do checks after the code updationEnabled javascript to the initial codeAllowed arbitrary loadadded local url to domains and updated the http exceptionUpdated code and plistimport UIKit
import WebKit
class ViewController: UIViewController, WKNavigationDelegate, ...