Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Delete object from Parse table in iOS.

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 620
    Comment on it

    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];
                    }
                }
            }];
    

    Happy Coding!!!

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: