How ca开发者_JAVA技巧n I prevent sensitive encrypted data stored on an iOS device from being automatically backed up by iTunes?
iTunes backup and restore developer details are here. The ~/Library/Caches
directory is the only location that persists while your application exists, but is NOT backed up. That's where you'd put files that you wanted to be sure never made it to the host syncing computer.(There don't seem to be guarantees about this never getting deleted, but it's currently only emptied as the result of a full restore.) The only other writable location that's not backed up is ~/tmp
, but the OS is allowed to flush that to reclaim space. The ~/Documents
and other directories are guaranteed to be backed up, so you wouldn't use them.
精彩评论