title: How to access a variable in another class in Objective C
body: <p>I have a problem when try to access a variable in a class. I'm a generate NSString in a AppDelegate.m and want to use this NSString in another class.m. I'm use "extern" in "AppDElegate.h" but my project dont build.</p>
  
  <p>My code in AppDelegate.m is</p>
  
  <pre><code>NSString * deviceTokenString = [[[[deviceToken description] 
  stringByReplacingOccurrencesOfString: @"&lt;" withString: @""] 
  stringByReplacingOccurrencesOfString: @"&gt;" withString: @""]   
  stringByReplacingOccurrencesOfString: @" " withString: @""];
  </code></pre>
  
  <p>My code in AppDelegate.h is</p>
  
  <pre><code>extern NSString *deviceTokenString;
  </code></pre>
  
  <p>And use in "AnotherClass.m" like this</p>
  
  <pre><code>- (void) sendEndPoint{
  NSLog(@"Token device  login:%@",deviceTokenString);
  }
  </code></pre>