Are NSUserDefaults data synced to iTunes?

大憨熊 提交于 2019-12-11 04:28:32

问题


I understand that NSUserDefaults data is unencrypted and should not be used to store sensitive information. I'm trying to understand how easily someone could get at that information. This thread shows that it's just a plain file on the iphone filesystem.

Will this file be transferred to the user's computer during an iPhone sync (if app sync is enabled)? If so, then it'd be extremely easy for anyone to read information stored in NSUserDefaults


回答1:


Yes the file will be synced during a backup and it will be just a regular file unless the user has enabled encrypted backups in iTunes, in which case the entire backup contents are encrypted.




回答2:


I tried this out. Turns out that it's not the same plist file that you can see in the simulator, but it is there in the backup directory after a sync. You can see the contents by running strings.

All the more reason to use the keychain!



来源:https://stackoverflow.com/questions/6229038/are-nsuserdefaults-data-synced-to-itunes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!