If you want to delete an object from Parse DB then you have to run a query to fetch that object and then run a loop to delete it. If you already have that object then just call delete method. Here is the complete code.
PFQuery *query = [PFQuery queryWithClassName:@"User_Details"];
[query whereKey:@"objectId" equalTo:[yourparseobject objectId]];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error){
if (!error) {
for (PFObject *object in objects) {
[object deleteInBackground];
}
}
}];
0 Comment(s)