If I pass a super class object into -archivedDataWithRootObject:
, but that object contains a subclass of the said super class; will that whole object graph be serialized to include the instance variables of the subclass or only the instance variables related to the super class?
Example:
@interface Mammal : NSObject
@property (nonatomic, copy) NSString *species;
@end
@interface Person : Mammal
@property (nonatomic, copy) NSString *name;
@end
Person *person = [[Person alloc] init];
person.species = @"Human";
person.name = @"Michael";
Mammal *mammal = person;
NSData *personData = [NSKeyedArchiver archivedDataWithRootObject:mammal];
Will the unarchived data only contain the Mammal instance variables?