Search code examples
htmliosswiftwkwebview

Load local resources along with HTML string in WKwebView (SWIFT)?


I have an html string(which i got from an api response). Also i have some js file, css file, images and fonts on the app bundle.

I need to load these files along with the html string in WKWebView

the html string look like this

the app bundle look like this

 bundle folder expanted

My question similar to this :

Thanks in advance


Solution

  • Click on "use folder reference" option instead of "create groups" while adding the resources files and folders into bundle.