title: Does iOS keychain storage persist when restoring an app to a new device?
body: <p>My question is directly related to this one but is different: <a href="https://stackoverflow.com/questions/17921931/ios-keychain-on-new-devices-or-on-restores">iOS: keychain on new devices or on restores</a>.</p>
  
  <p>The poster is curious if you store information in keychain storage, does it get backed up to iTunes and iCloud so that when you restore it to another device the data are persisted.  A partial answer to the OP's own question was: </p>
  
  <blockquote>
    <p>But now I read that the keychain is only restored if the backup is encrypted in iTunes (don't know about iCloud backups). </p>
  </blockquote>
  
  <p>The accepted answer was:</p>
  
  <blockquote>
    <p>You can transfer data using the iCloud, but this is NOT really secure! Save this data ENCRYPTED on your server and let the app read this data would be a solution. Btw. you shouldn't save sensible data unencrypted in the keychain. The keychain can be read really easy after jailbreak.</p>
  </blockquote>
  
  <p>Is whether the backup is encrypted or not determined by the developer's access to encrypt the data in code or by how the iTunes or iCloud user handles their backups?  The answer to this is very important to me because I am trying to set an initial launch date of an app that determines how long before they have to resubscribe with in-app subscriptions.  This piece of information must be shared between old and new devices and also remain on a single device even if the app is removed for a time period.</p>