Skip to content

I want to run Pyodide in an iOS offline environment. #2188

Answered by rth
otmb asked this question in Q&A
Discussion options

You must be logged in to vote

with an offline local path

Normally browsers will not allow loading .wasm files from local paths see FAQ. I see you have

        let config = WKWebViewConfiguration()
        config.preferences.setValue(true, forKey: "allowFileAccessFromFileURLs")

but I'm not sure if that is enough to bypass this restriction.

In your case, I would start with launching a local HTTP server to serve Pyodide assets to make sure that works with WKWebView and Swift. Then once this works, try to get rid of the HTTP server to load files directly from local URLs, but I'm not sure that this would be technically possible.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@otmb
Comment options

Answer selected by otmb
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants