我对createdAt系统字段进行了如下排序:
query.sortDescriptors = [NSSortDescriptor(key: "createdAt", ascending: false)]并得到以下错误:
CKError 0x1c4447fb0:“无效参数”(12/2018);服务器消息=“未知字段'createdAt'";uuid =9C450848-2449-2492-93BC-C46363203042;容器ID =”.
我能够以这种方式查询和排序我创建的字段。系统字段有什么不同吗?该字段的索引是可排序的和可查询的。
发布于 2018-04-22 10:56:00
相反,使用creationDate作为密钥。CK仪表板中的元键与用于查询的略有不同。以下是一个元密钥列表:
recordID: CKRecordID
The unique ID of the record.
recordType: String
The app-defined string that identifies the type of the record.
creationDate: Date?
The time when the record was first saved to the server.
creatorUserRecordID: CKRecordID?
The ID of the user who created the record.
modificationDate: Date?
The time when the record was last saved to the server.
lastModifiedUserRecordID: CKRecordID?
The ID of the user who last modified the record.
recordChangeTag: String?
A string containing the server change token for the record.https://stackoverflow.com/questions/49930687
复制相似问题