Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Dec 14, 2018 7:13 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: sandbox and delete
PostPosted: Tue Mar 05, 2013 10:52 pm 
Offline

Joined: Tue Aug 07, 2012 9:46 pm
Posts: 26
I have an app that converts text to MP3 that is in the app store and just sandboxing. I am running into an issue with sandbox where I can't delete the MP3 made the run before. Should I just come up with a rename process if the file exists or is there an easy way to delete files?

Thanks

Luke


Top
 Profile  
Reply with quote  
 Post subject: Re: sandbox and delete
PostPosted: Wed Mar 06, 2013 7:24 am 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:00 am
Posts: 583
Location: Beautiful Taiwan
lajdesign wrote:
I have an app that converts text to MP3 that is in the app store and just sandboxing. I am running into an issue with sandbox where I can't delete the MP3 made the run before. Should I just come up with a rename process if the file exists or is there an easy way to delete files?

Thanks

Luke


This may be a security-scoped bookmark issue, in which case you'll need to retain a bookmark to the file, then request access to it before you try to delete it. If I'm right, you won't even be able to rename the file without access.

_________________
Sam Rowlands
rMBP 15" @ 10.8 & '08 MBA 13" @ 10.6 + 10.7, RB2012
http://www.ohanaware.com/
AppWrapper - Prepare Apps for Mac App Store & OS X 10.8 - http://www.ohanaware.com/appwrapper/


Top
 Profile  
Reply with quote  
 Post subject: Re: sandbox and delete
PostPosted: Wed Mar 06, 2013 2:26 pm 
Offline

Joined: Fri Sep 30, 2005 7:20 pm
Posts: 857
rowlands wrote:
This may be a security-scoped bookmark issue, in which case you'll need to retain a bookmark to the file, then request access to it before you try to delete it. If I'm right, you won't even be able to rename the file without access.


Just wondering, do you need a bookmark for each file or can you just have one for the parent folder?

Kuzey

_________________
MY 3D Blog


Top
 Profile  
Reply with quote  
 Post subject: Re: sandbox and delete
PostPosted: Wed Mar 06, 2013 8:44 pm 
Offline

Joined: Tue Aug 07, 2012 9:46 pm
Posts: 26
Any examples of how to do security-scoped bookmarks?


Top
 Profile  
Reply with quote  
 Post subject: Re: sandbox and delete
PostPosted: Wed Mar 06, 2013 8:54 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:00 am
Posts: 583
Location: Beautiful Taiwan
lajdesign wrote:
Any examples of how to do security-scoped bookmarks?

Take a look at my sample project at http://www.ohanaware.com/appwrapper/SandboxableApplication.zip, specifically the sandboxSafeRecentItems.

You must request access everytime you want to anything with the file, and you must release it as soon as you're done, otherwise the Sandbox will lock access again and you won't be able to open it until your application is restarted.

_________________
Sam Rowlands
rMBP 15" @ 10.8 & '08 MBA 13" @ 10.6 + 10.7, RB2012
http://www.ohanaware.com/
AppWrapper - Prepare Apps for Mac App Store & OS X 10.8 - http://www.ohanaware.com/appwrapper/


Top
 Profile  
Reply with quote  
 Post subject: Re: sandbox and delete
PostPosted: Wed Mar 06, 2013 8:58 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:00 am
Posts: 583
Location: Beautiful Taiwan
Kuzey wrote:
rowlands wrote:
This may be a security-scoped bookmark issue, in which case you'll need to retain a bookmark to the file, then request access to it before you try to delete it. If I'm right, you won't even be able to rename the file without access.


Just wondering, do you need a bookmark for each file or can you just have one for the parent folder?

Kuzey

You should be able to bookmark a folder, although Apple do prefer files (document packages are acceptable). I have an app in development that does bookmark folders, we'll see later this year if Apple will accept it.

_________________
Sam Rowlands
rMBP 15" @ 10.8 & '08 MBA 13" @ 10.6 + 10.7, RB2012
http://www.ohanaware.com/
AppWrapper - Prepare Apps for Mac App Store & OS X 10.8 - http://www.ohanaware.com/appwrapper/


Top
 Profile  
Reply with quote  
 Post subject: Re: sandbox and delete
PostPosted: Wed Mar 06, 2013 9:57 pm 
Offline

Joined: Tue Aug 07, 2012 9:46 pm
Posts: 26
Thanks Sam for all your hard work.

Luke


Top
 Profile  
Reply with quote  
 Post subject: Re: sandbox and delete
PostPosted: Wed Mar 06, 2013 10:20 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:00 am
Posts: 583
Location: Beautiful Taiwan
lajdesign wrote:
Thanks Sam for all your hard work.

Luke

No worries - I had to do it for our own apps, and I've seen a great deal of people have to go through the same thing, so I though I'd share it.

_________________
Sam Rowlands
rMBP 15" @ 10.8 & '08 MBA 13" @ 10.6 + 10.7, RB2012
http://www.ohanaware.com/
AppWrapper - Prepare Apps for Mac App Store & OS X 10.8 - http://www.ohanaware.com/appwrapper/


Top
 Profile  
Reply with quote  
 Post subject: Re: sandbox and delete
PostPosted: Sat Mar 09, 2013 5:04 pm 
Offline

Joined: Fri Sep 30, 2005 7:20 pm
Posts: 857
Thanks Sam!

Keep us updated :)

Kuzey

_________________
MY 3D Blog


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group