Core Data is really super awesome and comes in a handy on almost my all of projects. I am posting quick code for deleting all your rows from entity. This code might do the job when you are in need of clearing all data.

- (void) clearAllRecords{
    NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
    NSEntityDescription *entity = [NSEntityDescription entityForName:@"Chat" inManagedObjectContext:managedObjectContext];
    [fetchRequest setEntity:entity];
    NSError *error;
    NSArray *items = [managedObjectContext executeFetchRequest:fetchRequest error:&error];
    fetchRequest = nil;
    for (NSManagedObject *managedObject in items) {
        [managedObjectContext deleteObject:managedObject];
    if (![managedObjectContext save:&error]) {