开发者

Which directories are deleted in the sandbox of an App during update

开发者 https://www.devze.com 2023-02-04 00:31 出处:网络
I cache some downloaded information in the NSLibraryDirectory in an App. However after a recent u开发者_开发百科pdate the users report having problems accessing the previously downloaded content in th

I cache some downloaded information in the NSLibraryDirectory in an App. However after a recent u开发者_开发百科pdate the users report having problems accessing the previously downloaded content in the Library directory.

Which directories are safe to cache information over new app versions? Is there any Apple documentation on this? I couldn't find any...

thanks a lot, e.


from Apple Application Programming Guide:

Files Saved During Application Updates When a user downloads an application update, iTunes installs the update in a new application directory. It then moves the user’s data files from the old installation over to the new application directory before deleting the old installation. Files in the following directories are guaranteed to be preserved during the update process:

<Application_Home>/Documents
<Application_Home>/Library 

Although files in other user directories may also be moved over, you should not rely on them being present after an update.


Note, however, that /Library/Caches is not preserved across updates; it's not even backed up.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号