我正在尝试查找当前登录用户附近的用户,但不知何故,结果对象不会返回任何用户。
var currentUserGeoPoint = PFUser.currentUser()![“currentLocation”] as! PFGeoPoint
var query = PFQuery(className:"User")
query.whereKey("currentLocation", nearGeoPoint: currentUserGeoPoint, withinKilometers: 100)
query.findObjectsInBackgroundWithBlock {
(objects, error) -> Void in
if (error == nil) {
println(objects)
}else {
println(error?.userInfo)
}
}
控制台返回:Optional([])
答案 0 :(得分:0)
班级名称应为_User。
public class aClass<T extends Comparable<? super T>> implements Queue<T> {}