Search code examples
iphoneiospasswordsitunesnsuserdefaults

Are NSUserDefaults data synced to iTunes?


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


Solution

  • 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!