Page 1 of 1

specialFolderPath("temporary")

Posted: Tue Apr 23, 2013 11:29 pm
by Dixie
I have just tried to use the "temporary" folder thinking that the files that are created in it would be lost when the app quits... and that is what I wanted. It seems however, that these files are preserved between launches, so to get rid of them I am deleting them in the preOpenStack handler...

Am I wrong in thinking that files in the 'temporary' folder would be deleted by iOS, rather than having to delete them in the preOpenStack handler ?

Dixie

Re: specialFolderPath("temporary")

Posted: Tue Apr 23, 2013 11:42 pm
by Simon
Hi Dixie,
I supposed you tried "cache" as well.
They both read the same in the notes but I would have thought cache was even more temp than temp. :)
This might also have to do with the app remaining in memory, maybe both folders only get cleaned out when the app is pushed from memory?

You are better than me at this so I'm just making a buzzing sound here.

Simon

Re: specialFolderPath("temporary")

Posted: Wed Apr 24, 2013 12:54 am
by Dixie
Hey Simon...
• cache – the folder in which the application should store any transient data that needs to be preserved between launches (this folder is not backed up by iTunes on sync)

• temporary – the folder in which the application should store any temporary data that is not needed between launches (this folder is not backed up by iTunes on sync)
It was the 'any temporary data that is not needed between launches', as opposed to in the note for the 'cache' folder that states 'any transient data' that needs to be preserved between launches, that made me think that the 'temporary' folder would be 'cleaned out', as it were.... I guess I misunderstood ...

And you have made me smile... No Simon, I am not better at this than you are... We are only as good as our last handler !...:-)

Dixie

Re: specialFolderPath("temporary")

Posted: Wed Apr 24, 2013 6:34 pm
by jacque
I think the temporary folder will get wiped by the OS if it needs more space. The data will stay there until the OS decides things are getting too crowded, which could be indefinitely or immediately when the app quits.