Post

Replies

Boosts

Views

Activity

load html file from documents directory fails to include css files
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.htmland:file:///var/mobile/Containers/Data/Application/AD332281-2ADE-4809-ABF2-F3FC3004AF42/Documents/MOTHER-APP/css/mother.cssThe 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" />
12
0
17k
Apr ’18