When I try to encode my custom object whit an NSMutableArray, I always get this exception:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'cannot encode (void *) value: <2063e916>'
What could cause this? The mutablearray is initialized, and on that point where it breaks it has data. I'm pretty sure I've done something wrong in the 'encodeWithCoder' method, because if I keep it empty, it runs well.
This is how I tried to convert my mutablearray to an array, but that didn't helped:
- (void) encodeWithCoder:(NSCoder *)encoder {
[encoder encodeObject:[[NSArray alloc] initWithArray:_myMutableArray] forKey:kMutableArrayKey];
}