CloudKitCodable icon indicating copy to clipboard operation
CloudKitCodable copied to clipboard

Why the cloudKitRecordType not a class property?

Open zangqilong198812 opened this issue 5 months ago • 1 comments

I think in the CloudKitRecordRepresentable protocol, the cloudKitRecordType should be a static var property. here is the code sample.

func fetchRecords(type: CKRecord.RecordType) async throws -> ([CKRecord], CKQueryOperation.Cursor?)

If I want to fetch a record list, I need pass the recordType to the function, but I can't get the RecordType from the CustomCloudKitCodable class, I have to initialize a instance ,then pass the instance.cloudKitRecordType to the function. Why don't let the cloudKitRecordType to be a static var property?

zangqilong198812 avatar Sep 08 '24 01:09 zangqilong198812