iOS App 版本更新后,Library/cache 文件夹会不会被覆盖(或清空)?
iOS APP版本更新之后,Library/cache文件夹是不会被覆盖或者清空的。
应用更新只更新.app文件. Document 和 library 的差别是前者会被iCloud 备份,所以不太重要的就别往Document目录下存了。temp文件夹会不定期被系统清理。
这个可以参考苹果的官方网站知道:
Only documents and other data that is user-generated, or that
cannot otherwise be recreated by your application, should be stored in
the <Application_Home>/Documents directory and will be automatically backed up by iCloud.Data that can be downloaded again or regenerated should be stored in the <Application_Home>/Library/Caches
directory. Examples of files you should put in the Caches directory
include database cache files and downloadable content, such as that used
by magazine, newspaper, and map applications.Data that is used only temporarily should be stored in the <Application_Home>/tmp
directory. Although these files are not backed up to iCloud, remember
to delete those files when you are done with them so that they do not
continue to consume space on the user’s device.