iTunes 是否备份核心数据?

Does iTunes backup core data?

我对 iCloud 中的备份文件和数据进行了一些研究,我想知道如果我不使用任何 iCloud 功能,核心数据是否会保存在 iTunes 备份中。

所以我得到了一个应用程序,其最近的服务器连接保存在核心数据中以将其填回 UITableView。如果我使用 iTunes 备份设备并稍后在另一台设备上恢复它,最近的连接是否仍会显示?

我发现 Q/A 的

None 明确回答了这个问题。

另外一个问题:是否可以使用正在开发的应用程序来尝试这些 itunes-backup 东西?

这取决于您保存核心数据数据库的位置。

通常 LibraryDocuments 目录由 iTunes(和 iCloud)备份,tmp 缓存 未备份。

参见:Apple Documentation - iOS Standard Directories: Where Files Reside

AppName.app
This is the app’s bundle. This directory contains the app and all of its resources. You cannot write to this directory. To prevent tampering, the bundle directory is signed at installation time. Writing to this directory changes the signature and prevents your app from launching. You can, however, gain read-only access to any resources stored in the apps bundle. For more information, see the Resource Programming Guide
The contents of this directory are not backed up by iTunes. However, iTunes does perform an initial sync of any apps purchased from the App Store.

Documents/
Use this directory to store user-generated content. The contents of this directory can be made available to the user through file sharing; therefore, his directory should only contain files that you may wish to expose to the user.
The contents of this directory are backed up by iTunes.

Documents/Inbox
Use this directory to access files that your app was asked to open by outside entities. Specifically, the Mail program places email attachments associated with your app in this directory. Document interaction controllers may also place files in it. Your app can read and delete files in this directory but cannot create new files or write to existing files. If the user tries to edit a file in this directory, your app must silently move it out of the directory before making any changes.
The contents of this directory are backed up by iTunes.

Library/
This is the top-level directory for any files that are not user data files. You typically put files in one of several standard subdirectories. iOS apps commonly use the Application Support and Caches subdirectories; however, you can create custom subdirectories. Use the Library subdirectories for any files you don’t want exposed to the user. Your app should not use these directories for user data files.
The contents of the Library directory (with the exception of the Caches subdirectory) are backed up by iTunes.
For additional information about the Library directory and its commonly used subdirectories, see The Library Directory Stores App-Specific Files.

tmp/ Use this directory to write temporary files that do not need to persist between launches of your app. Your app should remove files from this directory when they are no longer needed; however, the system may purge this directory when your app is not running.
The contents of this directory are not backed up by iTunes.