Skip to content

Instantly share code, notes, and snippets.

@insidegui
Created March 5, 2017 20:22
Show Gist options
  • Save insidegui/42787a138c7213dd18e23b0ad633150c to your computer and use it in GitHub Desktop.
Save insidegui/42787a138c7213dd18e23b0ad633150c to your computer and use it in GitHub Desktop.
// `recordID` is the record ID returned from CKContainer.fetchUserRecordID
CKContainer.default().publicCloudDatabase.fetch(withRecordID: recordID) { record, error in
guard let record = record, error == nil else {
// show off your error handling skills
return
}
print("The user record is: \(record)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment