Search code examples
ioscloudkitckrecord

Any drawback if CKRecordID.recordName is generated on client?


It could provide a more smooth user experience if recordName is generated on client.

var uuid = NSUUID().UUIDString

Do you know any disadvantage to do it?


Solution

  • recordName is always generated on the client.

    If no recordName is supplied by your application the CloudKit framework will generate a UUID on the client side before sending it to the server.

    There is no speedup in generating a UUID in your own code versus letting the CloudKit framework generate one for you.

    Client-created recordNames exist to help your application map CloudKit records to your own local data storage. If you don't need to do that then you can leave it up to CloudKit.