Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

app A stores passwords in keychain programmatically. One password is stored in one keychain item. Keychain item is a class of type Generic Password. app A is installed & used in idevice1 & idevice2 (ios4.0 & later). Now take the encrypted backup of device1 and restore it in device2.

Does it overwrite the keychain items of same match in device2 or stores the keychain items from backup alone?

share|improve this question
add comment

1 Answer

When you restore an iOS backup - all the previous contents are gone so there is no merging of old and new contents. You end up with the current keychain matching the backed up keychain.

The only subtle aspect is that if you do not have a passcode lock on the device, some items stored in the keychain are wiped (either not backed up or not restored - it's not clear when this happens). This ensures that you actually have to re-enter mail passwords and such.

This protects from someone restoring your backup without your knowledge and then being able to read your email. They either need to know your passcode or your password to make use of a restored keychain and app settings on a new device initially after restore.

share|improve this answer
    
Also worth noting that the Keychain no longer properly moves from an iOS 5 device to a different iOS 6 device. It took a lot of wrangling with Apple developer support to figure out what was going on, but they've changed things since it turned out that the old system wasn't secure. As such, if you're finding that you've lost Keychain info during a device upgrade, it's not a solvable problem, unfortunately. –  Matthew Frederick Oct 21 '12 at 14:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.