Can the contents of the NSCachesDirectory be deleted by the system while the application is open?

As a title.

Is it possible that the files stored in NSCachesDirectory

can be deleted by the system (i.e. in low storage situations), while mine is running in the foreground?

+3


source to share


1 answer


Filesystem Programming Guide

In iOS 5.0 and later, the system may delete the Caches directory on rare occasions when the system is on a very low drive. This will never happen while the application is running. However, you should be aware that restoring iTunes is not necessarily the only condition under which the Caches directory can be deleted.



So the answer is: No, it is not possible to delete the NSCachesDirectory while the application is running in the foreground.

However, their wording is a little ambiguous with regard to the application running in the background.

+2


source







All Articles