I am trying to store a custom objects as follows, but I am getting an error.
// store data NSMutableArray *archiveArray = [NSMutableArray arrayWithCapacity:p
You unarchive incorrect object. You store NSArray to NSUserDefaults
NSArray * archiveArray = [userData objectForKey:@"personDataArray"]; for (NSData *personEncodedObject in archiveArray) { id personObject = [NSKeyedUnarchiver unarchiveObjectWithData:personEncodedObject]; }