Reputation: 1706
I'm trying to order search results by the modified date. If I wanted to do by creationDate its:
query.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]
What's the key for modified date? A list of all NSSortDescriptor keys or a way to find them would be extremely helpful.
Upvotes: 5
Views: 2361
Reputation: 19
You can simply look at the CKRecord keys (metadata) on the Apple website here; https://developer.apple.com/reference/cloudkit/ckrecord
This is in answer to your last question.
Upvotes: 1
Reputation: 1706
Found it on accident after randomly trying 100 things. It's:
query.sortDescriptors = [NSSortDescriptor(key: "modificationDate", ascending: false)]
They key being "modificationDate" I could still use a list of these a info on how to find them. -Thanks
Upvotes: 10