title: Why Class is Serialized Even Without NSCoding Protocol
body: <p>I am using the following class: </p>
  
  <h1>import </h1>
  
  <pre><code>@interface Person : NSObject
  {
  
  }
  
  @property (nonatomic,copy) NSString *firstName;
  @property (nonatomic,copy) NSString *lastName; 
  
  @end
  
  @implementation Person
  
  - (instancetype)initWithCoder:(NSCoder *)coder
  {
      self = [super init];
  
      self.firstName = [coder decodeObjectForKey:@"firstName"];
      self.lastName = [coder decodeObjectForKey:@"lastName"];
  
      return self;
  
  }
  
  - (void)encodeWithCoder:(NSCoder *)coder
  {
      [coder encodeObject:self.firstName forKey:@"firstName"];
      [coder encodeObject:self.lastName forKey:@"lastName"];
  }
  
  @end
  </code></pre>
  
  <p>I can still serialize this class without conforming the NSCoding protocol. The following code works. My question is why?</p>
  
  <pre><code> // create a person
      Person *person = [[Person alloc] init];
      person.firstName = @"John";
      person.lastName = @"Doe";
  
      NSData *personData = [NSKeyedArchiver archivedDataWithRootObject:person];
  </code></pre>