作为标题。
我存储在 NSCachesDirectory
中的文件是否有可能被系统删除(即在低存储情况下),当我在前台运行时?
最佳答案
On iOS 5.0 and later, the system may delete the Caches directory on rare occasions when the system is very low on disk space. This will never occur while an app is running. However, you should be aware that iTunes restore is not necessarily the only condition under which the Caches directory can be erased.
所以答案是 - 不,当应用程序在前台运行时,NSCachesDirectory 是不可能被删除的。
但是,关于在后台运行的应用程序,他们的措辞有些含糊。
关于iphone - 应用程序打开时,系统是否可以删除 NSCachesDirectory 的内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14609266/