I'm having some kind of weird problem when I try to request all users from the User class. He does not find 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 to replace
var query:PFQuery=PFQuery(className: "User");
with
var query:PFQuery=PFQuery(className: "AnotherClass");
and everything worked as it should. I think this should be something special in the User class
source share