I am trying to write a predicate using coordinates stored in a CloudKit database. I am struggling to find any accurate documentation on the way to format it. Here is what I've come up with:
NSPredicate(format: "distanceToLocation:fromLocation: (%K,%@) < 1000", "locationcoordinates")
I am getting the following error:
Terminating app due to uncaught exception 'CKException', reason: 'Expected CLLocation argument for distanceToLocation:fromLocation:'
Can anyone help me correct this predicate? I'm not sure what argument I need to add.