title: Swift : Type XXX must conform to protocol 'NSObjectProtocol'
body: <p>I am trying to implement a Swift class that must </p>
  
  <ol>
  <li>Inherit from an Objective-C class</li>
  <li>Implement a Objective-C protocol with class variable.</li>
  </ol>
  
  <p>Although the Objective-C class I am subclassing is inheriting from NSObject, I receive the following compilation error :</p>
  
  <p><code>Type DDBItem  must conform to protocol 'NSObjectProtocol'
  </code></p>
  
  <p>The Objective-C class and Objective-C protocol I am inheriting / implementing are available at 
  <a href="https://github.com/aws/aws-sdk-ios/blob/master/DynamoDB/AWSDynamoDBObjectMapper.h">https://github.com/aws/aws-sdk-ios/blob/master/DynamoDB/AWSDynamoDBObjectMapper.h</a> </p>
  
  <p>AWSDynamoDBModel has a long chain of inheritance that eventually starts with NSObject
  AWSDynamoDBModeling is enforcing two class variables.</p>
  
  <p>My code is </p>
  
  <pre><code>class DDBItem : AWSDynamoDBModel, AWSDynamoDBModeling {
  
  //    class var dynamoDBTableName : String { get { return "" }}
  //    class var hashKeyAttribute  : String { get { return "" }}
  
      class func dynamoDBTableName() -&gt; String! {
          return ""
      }
      class func hashKeyAttribute() -&gt; String! {
          return ""
      }
  }
  </code></pre>
  
  <p>Bonus Question : when trying to implement the Objective-C protocol mandated class variables as Swift  class variables, I receive a compilation error :</p>
  
  <p><code>Type DDBItem  must conform to protocol 'AWSDynamoDBModeling'</code></p>
  
  <p>Implementing them as function seems to be accepted.  Why ?</p>