Change web feed key to be an md5 has of the url.
This commit is contained in:
parent
71b5c8bc86
commit
231e3a12e2
|
@ -82,7 +82,8 @@ final class CloudKitAccountZone: CloudKitZone {
|
|||
|
||||
/// Persist a web feed record to iCloud and return the external key
|
||||
func createWebFeed(url: String, editedName: String?, container: Container, completion: @escaping (Result<String, Error>) -> Void) {
|
||||
let record = CKRecord(recordType: CloudKitWebFeed.recordType, recordID: generateRecordID())
|
||||
let recordID = CKRecord.ID(recordName: url.md5String, zoneID: Self.zoneID)
|
||||
let record = CKRecord(recordType: CloudKitWebFeed.recordType, recordID: recordID)
|
||||
record[CloudKitWebFeed.Fields.url] = url
|
||||
if let editedName = editedName {
|
||||
record[CloudKitWebFeed.Fields.editedName] = editedName
|
||||
|
|
Loading…
Reference in New Issue