Accessing resources in an iOS bundle (beta) #9810
Replies: 2 comments 13 replies
-
There should be a json file in |
Beta Was this translation helpful? Give feedback.
-
Ok, took me a while to figure out what was wrong here (needed frameworks for iOS first). Long stor short, the issue here seems to be that the binary resource system simply hasn't been implemented for iOS yet. There's more people running into that though, so I suppose feature parity on this front with regular macOS builds is something people expect to work. Is this something that's on the roadmap for the initial v2 release? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I'm building a mobile app for iOS, and I'd like to package some resource files along with the bundle. I want to read the (audio) files in within Rust, but send their relative paths over from the frontend.
All these files live in
../../../assets
(or subfolders therein), relative totauri.config.json
.I've set up
["bundle"]["resources"] = ["../../../assets"]
intauri.config.json
, but this doesn't seem to be enough. The v1 guide mentions anallowList
, but I can't seem to find anything about that in the sparse v2 docs.I'm also not sure whether specifying it like this will copy the
assets
folder, or it's children, and whether it'll keep the internal folder structure.In other words: how do I put external files in my bundle, so that I can send the path through a command and load them from my rust code with the v2 beta?
Just found out I can view the web console when right clicking the window, and when trying to access the file with
resolveResource()
it does give me a 400 bad request error.Unhandled Promise Rejection: path.resolve_directory not allowed. Permissions associated with this command: path:allow-resolve-directory, path:default
Found a v2 guide about permissions, but I'm still a bit baffled how I'm supposed to tie this all together 😅
Beta Was this translation helpful? Give feedback.
All reactions