The problem should be this string:
NSMutableDictionary *tempCompleted = [self.mainDictionary objectForKey:[NSString stringWithFormat:@"Completed %@",currentStringSubject]];
be sure that when you take this object from the mainDictionary
it is an NSMutableDictionary
otherwise is a NSDictionary
and it is immutable.
If is immutable check your code, or you can also solve using a mutableCopy like:
NSMutableDictionary *tempCompleted = [[self.mainDictionary objectForKey:[NSString stringWithFormat:@"Completed %@",currentStringSubject]] mutableCopy];