Posts

Post not yet marked as solved
3 Replies
497 Views
This returns nothing even though there are multiple records in the radius. The field name of the location is Location.There is obviously code after this but that works fine it is just the predicate that doesn't work. let LocationOfUser = CLLocation(latitude: location.latitude, longitude: location.longitude) let fixedRadius = NSNumber(integerLiteral: 5000) let pred = NSPredicate(format: "distanceToLocation:fromLocation:(Location, %@) < %f", argumentArray: [LocationOfUser, fixedRadius]) let sort = NSSortDescriptor(key: "rating", ascending: true) let query = CKQuery(recordType: RecordType.Items, predicate: pred) query.sortDescriptors = [sort]
Posted Last updated
.