I have an App which moves all HTML files to my own folder on the iPhone:
file:///var/mobile/Containers/Data/Application/AD332281-2ADE-4809-ABF2-F3FC3004AF42/Documents/MOTHER-APP/index.html
and:
file:///var/mobile/Containers/Data/Application/AD332281-2ADE-4809-ABF2-F3FC3004AF42/Documents/MOTHER-APP/css/mother.css
The problem is - when the App loads the index.html file into webview no CSS files are available.
I have tested if the index file and the CSS file exists and it is all there.
I have tried both:
webView.loadHTMLString(indexfile, baseURL: baseUrl)
and:
webView.loadFileURL(destinationURLForFile, allowingReadAccessTo: destinationURLForFile)
The HTML index file requests the CSS like this:
< link rel="stylesheet" type="text/css" href="css/mother.css" />