I encounter some strange problem when I try to query all users from the "User" class It dos not find any Users
var query:PFQuery=PFQuery(className: "User");
query.findObjectsInBackgroundWithBlock {
(objects: [AnyObject]!, error: NSError!) -> Void in
if !(error != nil) {
for(var i=0;i<objects.count;i++){
var object=objects[i] as PFObject;
var name = object.objectForKey("username") as String;
println(name);
}
}
}
I tried replacing
var query:PFQuery=PFQuery(className: "User");
with
var query:PFQuery=PFQuery(className: "AnotherClass");
and everything worked like i should. I think it must be something special about the "User" class