title: How To Implement iCloud Backup
body: <p>I've watched a couple of talks on iCloud and most focus on its three core services (key-value storage, document storage, and CloudKit) yet all I want to know is how to turn on backups so if my user's phone is stolen or smashed:</p>
  
  <ol>
  <li>My app will have already created a recent backup on the cloud</li>
  <li>My app will restore that backup when the user gets their new phone</li>
  </ol>
  
  <p>A few notes:</p>
  
  <ol>
  <li>My app uses CoreData</li>
  <li>I'm not looking for a solution for syncing devices, just backup/restore</li>
  <li>I also intend to continue relying on local storage as the primary data sources, so the app works even when the phone has no internet connection </li>
  </ol>
  
  <p>I found <a href="https://stackoverflow.com/questions/30886331/full-coredata-uploading-backup-to-icloud-drive-and-restore-if-need">this SO question</a> but the answer is a link and the link is dead.  I can't find anything explaining how to do this, please help!</p>