I am trying to utilize CloudKit
in my iOS application, but when I attempt to create a new record for for a User
record type (record type is named
In addition to Edwin's answer, it's entirely feasible to save custom fields to the public Users
recordType, but you need to retrieve the CKRecordID
for the user first (via CKContainer
fetchUserRecordID()
or discoverUserIdentity()
) and then build the CKRecord
on Users
using that ID.
Also, if you're using CKModifyRecordsOperation
make sure the savePolicy
is set to .changedKeys
in order to allow the update to go through.