Saving data to CloudKit in iOS

To save date to CloudKit, we must make:
A CKRecordID (the key of your unique record)

A CKRecord (which includes data)

Making a record key

To ensure that every new record identifier is unique, we use the current timestamp, which is unique. We get the timestamp using NSDate’s method timeIntervalSinceReferenceDate(). It is in form of ###.### (# are numbers), which we will use the integer part. To do this, we split the string:

Swift

let timestamp =…

--

--

iOS Developer, Triple graduated, Passionate, Love workout, blogger

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mr.Javed Multani

iOS Developer, Triple graduated, Passionate, Love workout, blogger