I downloaded three days ago a sandboxed application.
It keeps ask me to click in an Extract button because of sandboxing. If I click cancel, as one would expect, nothing is done (the save is not done).
Is this usual ?
BTW: that is that application who sas it is sandboxed.
This sounds like an issue you should bring up with the developer of whatever app that may be.
Depending on where you downloaded it, I might be very leery of that app.
What application? There could be a bunch of reasons as to why this happens.
For instance I implemented a ‘Restore’ function to Backup To Go, but it doesn’t work if the original file has been deleted (which is why you’d backup). Turns out that a Security-Scoped Bookmark is only valid, when the file exists. If the original file is deleted, I can’t re-open that bookmark to restore it. So I have to ask the user to choose where to ‘Restore’ their files to.
The application comes from the App Store.
The situation evolves with time: sometimes it ask only once and never ask again and some reboot later (afternoon, the day after), it consistently ask to confirm the Extract location
Sam: this is an archive expander (I use it as is); and no, I do not ask to delete the archive file to expand (I prefer to keep it for security reasons).
On the other hand, the application works fine.
Here’s the Extract buttons Parent window:
The text explain why this window is displayed and that the permission will be set to write into that folder (remembered for later use).
Unfortunately - as I wrote above - this is not alwyas true; it is false, most of the time.
Since the image is not displayed (but due to McDonalds France WiFi Third Party filtering it), here is the image link:
I can confirm the filtering (for me and probably all McDonalds customers in France) as I can see my screen shot from a different location (not filtered).
Ok, this makes sense and I yes it does have to operate in that manor, you can only read and write to files or folders that your application has permission for.
Yes Sam, but only the first time you run the application, not nearly everytime. (nearly because it asked me once in a session, one day, then never do that again.)
By everytime, I mean: it ask me all the time in the same running session.
If he asked me the first time I run it in each live sessions, OK. But thousand times in a session ?
At last, what if i wrote an AppleScript to deal with a folder full of archives ?
BTW: this is not in Off-Topic, because I also want to know if your applications (yes, my fellow programmers), your sandboxed applications buit with Xojo works the same.
Some of what you say is due to the Sandbox mechanism. Some of it sounds like a lazy developer.
Basically, your app can"t access users folders until a user grants it ‘permission’, either by dragging the file/folder in to the application or using a open/save dialog.
However once you have permission, you can use either NSDocumentController to add that as a recent file, or store a Security-Scoped Bookmark to hold onto that permission (with a bit of hacking you can even retain permission by setting the window icon).
From what I understand it seems like the other developer is not holding on to permission correctly, but I can’t say for sure without exactly seeing his code. There are some issues with SSB, and he may have discovered one, or may not be using it correctly either.
Good catch Sam, I will experience drag and drop and Open (from File).
'till now, I only used double-click.
Yes, Sam you found it !
Drag and drop an archive in the application ask if I really want to do that ONCE (only).
Double-click in an archive file ask ALWAYS.
This is queer !