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?
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 recordName
s 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.
That should be exactly the designed purpose of the given CKRecordID
constructors.
As long as you don't try to insert the same generated ID into multiple records (which might force you to add a little more error handling), I can't see any disadvantages here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With