I\'m currently saving an NSDictionary to file on the iOS device. However, NSDictionary files are readable XML. I don\'t want people to be able to get in and read the contents
Use a NSKeyedArchiver
to create an NSData
object from your dictionary (NSKeyedArchiver archivedDataWithRootObject:). Then encrypt the NSData with AES and write that to your file.
Reading takes the reverse: first, read the NSData, decrypt it via the method from the mentioned link, then pass the decrypted NSData to NSKeyedUnarchiver (NSKeyedUnarchiver unarchiveObjectWithData:) and you get your dictionary back.