简体   繁体   中英

retain program data in iOS app while updating and sync to iCloud

When a new upgrade is released and installed on iOS, which folders / files are left untouched by the upgrade process? There are several folders; Library, Caches, Preferences, Documents.

Normally Application Support Directory is not created by default. What happen to AS folder during upgrade?

I learn that all data in Documents folder will copy to iTunes or iCloud by default. Is that true?

If I create my own CoreData db to persist, where should I keep?

Your best bet is to read the first half (which pertained to iOS) of this document from Apple :

In my experience, I put Core Data db in Documents folder if the iTunes File Sharing feature was not enabled on your app. Otherwise create a folder in the Library folder called Application Support or anything name, etc. With iTunes File Sharing enabled, user can accidentally delete any files in the Documents folder.

During the upgrade, the contents of Library and Documents folder are retained.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM