Accessing resources in an iOS bundle (beta) #9810
Unanswered
stijnfrishert
asked this question in
Q&A
Replies: 1 comment 8 replies
-
There should be a json file in |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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