Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I sort CloudKit results by modified date?

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.

like image 207
gbachik Avatar asked Aug 04 '15 04:08

gbachik


1 Answers

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

like image 78
gbachik Avatar answered Sep 18 '22 19:09

gbachik