title: Using Core Data, iCloud and CloudKit for syncing and backup and how it works together
body: <p>I am in the early stages of creating an app where I would like to save, sync and backup data.  The app will not store any files just data in a database. It is going to be iOS 8 and up so I am able to use CloudKit.  I did some research and still not clear on how Core Data, iCloud and CloudKit work together. </p>
  
  <p>As far as understand CloudKit is just a way of getting and retrieving data to/from the cloud. Is CloudKit just a different way of syncing data with iCloud?</p>
  
  <p>My questions are: </p>
  
  <ol>
  <li><p>If I do use CloudKit, do I still need to create local core data database?</p>
  
  <ul>
  <li>If yes will it be automatically synced with iCloud or I would have to call methods to store to both places?</li>
  </ul></li>
  <li><p>If the data is only stored in the cloud will user be able to access it when iOS device is not connected to the internet. I read that CloudKit will have only limited caching.</p></li>
  <li>How will that work if iCloud account is not enabled. </li>
  </ol>
  
  <p>If someone can kind of break down what each technology does in the process of saving and syncing core data database offline and online.</p>
  
  <p>My current understanding is:</p>
  
  <ul>
  <li><p>Core Data is used to store data locally </p></li>
  <li><p>iCloud syncs the data and stores in the cloud </p></li>
  <li><p>CloudKit gives the ability to store and manage data in the cloud??</p></li>
  </ul>
  
  <p>I hope I provided enough info for this question not to get closed.</p>