So I ran into this error when getting all the users from parse to my application:
Cannot invoke 'findObjectsInBackgroundWithBlock' with an argument list of type '(([AnyObject]!, NSError!) -> Void)'
trying to run this code:
var userQuery = PFUser.query()
userQuery.findObjectsInBackgroundWithBlock({(objects: [AnyObject]!, error: NSError!) -> Void in
self.users.removeAll(keepCapacity: true)
for object in objects {
var user:PFUser = object as PFUser
self.users.append(user.username)
}
self.tableView.reloadData()
})
I am using xcode 6.3, is there any solutions? I've tried adding "?" instead of "!" after [AnyObject] but nothing seems to help.