Hi all. I’m building an app that reads two txt files stored on the desktop ( all good… i know they work fine)
It all works well when run from vuo environment, but as soon as I export an app, it stops updating from these files . Any idea why ? I’m literally just ‘fire on start’ read and update periodically in case text has changed via a button press to update display.
Here’s an example where file reading/writing works both in the original composition and the exported app: save-fetch-data.vuo (1.7 KB)
For this to work, you do need to tell macOS that the app is allowed to access your Desktop. When you first launch the app, macOS should pop up a dialog asking if you want to allow this.
If you never got that dialog for your exported app, then it may be looking for the file inside the app bundle instead of on the Desktop. Compare the
Fetch Data node’s URL port in your composition and the attached composition. You’ll want yours to start with either a slash (
/) or a tilde (
~). If so, then the exported app will look for the file on the Desktop. Otherwise, the exported app will have a copy of the file bundled inside of it and will be reading from that copy.
For more information, see Exporting an application in the Vuo manual and this earlier discussion.
Hope that helps. But if it doesn’t answer your question, please post your composition so we can see exactly how you’re reading the file.
Thank you. I was going to reply here also and say that i used the tilda path rather than just draging the file to the input to get the URL and this seems to have worked okay.
I thik I did get the permissions dialogue once, but havent since …even though ive been saving as different versions etc. Seems to work ok though. Thanks for the reply