title: how to save and load a number (integer) using CloudKit (swift)
body: <p>I am creating an app that needs to save a counter variable (which is an integer) into the cloud when the app exits, then loads the counter when the app becomes active. Ive never used CloudKit before could someone simplify how i could do this using swift? many of the examples I've tried to replicate are too complex for what I am trying to achieve.</p>
  
  <p>Note:  Before anyone mentions it , I know there are other ways to achieve this but I want to do it using CloudKit.</p>
  
  <p>Also, I already understand how appDelegate transitions work so i don't need help with that :) </p>