Drop a file on a window and Sandboxing

I’ve created a “Drop Zone” in my app so the user can drag-and-drop a file onto a window to get it open.
Would this work when the app is Sandboxed? I’m thinking since it isn’t using the OpenFile Dialog it might not work.

Any expertise? :wink:
(don’t have a certificate yet to sandbox hence the question)

Yes, drag’n’drop give access to the file when Sandboxed.

Sweet! Thank you for the confirmation :slight_smile:

Yes, it works. You can list the files in a ListBox or you can open it, but you can’t change the file name or you can’t copy it to another folder. I have set “Read/Write user selected files” option for the MAS sandbox, but you can’t change droped files (you get always a “file does not exists”, or “file not found” error if you would change the file). In Xojo this works only for files and folder that the user has choosed with the “file open dialog”. In the apple sandbox developers documentation you can see, that “file open” and “drag and drop” of files and folders are sandbox safe, but it works only with Xcode.

Hmm, let’s see if I get this right :slight_smile:
I have a window that accepts file-drop. This would work in sandbox if I NEVER WRITE to the file that has been dropped.
In that case I’ll have to remove this function. I also have an OpenDialog so that would have to suffice :confused:

I’ve been waiting for Apple to approve my company enrollment for 3 weeks now…I want my certificate so I can try this stuff myself… :wink:

I had a similar wait a few years ago until I emailed them - within hours it was sorted. Might be worth a try.

Yepp, did that some days ago but no response yet though.

Maybe some more information could help here, I agree that you cannot change the file name, but you can copy the file and you can write to it. Shine does both of these and is fully sandboxed.

Finally got my enrollment approved so I could sandbox it and I’ve tried the drag-and-drop feature and it seems to be working fine.
Read/Write :slight_smile:
The files my app creates/reads are bundles containing an SQLite database. Don’t know if that makes a difference that made it work :slight_smile: