I have a button where user can delete a friend:
it looks like this:
("self.otherUser"
is a PFUser
instance which contains the friend user to delete)
("friends"
is an array field
in the User table which contains friends ObjectIds
)
PFQuery *deleteFriendQuery = [PFUser query]
[deleteFriendQuery whereKey:@"objectId" equalTo:[PFUser currentUser]];
[deleteFriendQuery whereKey:@"friends" equalTo:[self.otherUser objectId]];
[deleteFriendQuery getFirstObjectInBackgroundWithBlock:^(PFObject *object, NSError *error) {
[object delete];
}];
Nothing is deleted in the data browser, where am I wrong ? Does anyone knows a way to do this ?