Closed ajitam closed 8 months ago
I'm having the same issue. I'm trying to serve local files and open them in a webview in the same app. Like above, I can confim that files are there (e.g. I can open the files in webview directly with webView.loadFileURL
) and I can confirm that Swifter is working by getting a reponse from it. But I get a 404 when trying to serve the local files via Swifter.
Please let me know if anyone has been able to find a workaround, or can recommend an alternative solution (library) for this problem.
Hello, I have a task of "reviving" someone else iOS app which uses your (Swifter) library. I've encountered quite weird problem:
Here is the setup:
/serve
on the phone (there is a folder calledwebapp
and inside isindex.html
and folderres
with some css files)http://localhost:8080/webapp/index.html
Main problem is that I get
Status code: 404
Here are my findings:
files are there - I'm listing whole folder tree and printing content of
index.html
swifter (and webview) works I replace
with
and I get
You ask for...
in webviewif I add
servePath
/webapp
and the end and remove it from webview request (making it http://localhost:8080/index.html) - webpage loads with out no style. I then went in with inspector and saw that all other files get404
(so for example http://localhost:8080/src/main.css)]Is there something with directories that is blocking (permissions or sth)?
Thx for the help