Reputation: 1
I have setup a Swift project with the TrueVault iOS SDK. When running this code, it returns with kTrueVaultErrorDomain error 400:
var query : TVQuery = MDRequest.queryWithFilters(filters)
query.sorts = [TVSort(descendingWithKey:"date")]
query.findObjectsWithCompletionHandler {...}
However, if I do not include the TVSort line, it works fine:
var query : TVQuery = MDRequest.queryWithFilters(filters)
query.findObjectsWithCompletionHandler {...}
There's something about setting up the sort. In ObjC it works fine (as in with the truevaultdemoapp). What could be the cause? I've tried using NSArray instead but still same problem. What could be happening?
Upvotes: 0
Views: 107
Reputation: 111
Change descendingWithKey to sortDescendingWithKey and see if that works.
Upvotes: 0