1
votes

Here is a copy of my code where the error is giving me, the error is on the line where it says query.findobjectsInBackgroundWithBlock(completionBlock).

The full error message is this:

Cannot convert value of type 'PFArrayResultBlock' (aka'(Optional>, Optional) -> ()') to expected argument type 'PFQueryArrayResultBlock?

I'm totally new to swift.

static func getFollowingUsersForUser(user: PFUser, completionBlock: PFArrayResultBlock) {
    let query = PFQuery(className: ParseFollowClass)

    query.whereKey(ParseFollowFromUser, equalTo:user)
    query.findObjectsInBackgroundWithBlock(completionBlock)
}
1

1 Answers

0
votes

There is a mismatch between the block types. The expected one is

PFQueryArrayResultBlock

while the provided one is of type

PFArrayResultBlock

Note the missing Query!?