I have created hello.html file .when I am try to access it,url is returning nil everytime.
override func viewDidLoad() {
super.viewDidLoad()
if let url = Bundle.main.url(forResource: "hello", withExtension: "html"){
if let htmlData = try? Data(contentsOf:url){
let baseURL = URL(fileURLWithPath: Bundle.main.bundlePath)
webView.load(htmlData, mimeType: "text/html", textEncodingName: "UTF-8", baseURL: baseURL)
}
}
// Do any additional setup after loading the view.
}