title: Why isn't the instance variable declared?
body: <p>I'm using xcode 4.5.2 and LLVM 4.1. I am expecting that I do not need to synthesize a class property nor declare an instance variable, but I'm getting errors stating that these expectations are wrong.</p>
  
  <p>My class:</p>
  
  <pre><code>@interface Test : NSManagedObject
  @property (strong, nonatomic) NSString *string;
  @property (strong, nonatomic) NSString *number;
  @end
  
  @implementation Test
  - (NSString*)string {
      return _string;
  }
  @end
  </code></pre>
  
  <p>1) <strong>Use of undeclared identifier 'string'</strong></p>
  
  <p>I've also seen in WWDC 2010 Session 144 the following:</p>
  
  <pre><code>return self-&gt;string;
  </code></pre>
  
  <p>But that is giving an error with a suggestion to use dot notation.</p>
  
  <p>2) <strong>Property 'string' found on object of type 'Test *'; did you mean to access it with the "." operator?</strong></p>
  
  <p>I'm also getting a warning for <code>number</code>:</p>
  
  <p>3) <strong>Property 'number' requires method 'number' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation</strong></p>
  
  <p>I am entirely lost as to what is going on here. It's starting to boil my blood just a little bit. What am I missing?</p>