title: I'm trying to add a string to an array in a singleton
body: <p>Below is the code in my singleton to add a string to an array. The first NSLog returns the correct string but the second NSLog does not and returns null. If there is any relevant code I need to add let me know. Thanks.</p>
  
  <pre><code> +(void) addArray:(NSString *)string
  {
      NSLog(@"%@",string);
  
      Singleton *shared = [Singleton sharedManager];
      [shared.array addObject:string];
  
      NSLog(@"array: %@", shared.array);
  }
  </code></pre>
  
  <p>I added this code to my singleton.m</p>
  
  <pre><code>- (id)init
  {
      self = [super init];
  
      if (self) {
          // Work your initialising magic here as you normally would
          array = [[NSMutableArray alloc]init];
      }
  
      return self;
  }
  </code></pre>
  
  <p>In another part of my program I run this code and it prints out the correct information</p>
  
  <pre><code>+(void) setPoints:(int) points
  {
      Singleton *shared = [Singleton sharedManager];
      shared.points = points;
      NSLog(@"%d",shared.points);
  }
  </code></pre>
  
  <p>Here is my Singleton method</p>
  
  <pre><code>+ (Singleton *)sharedManager
  {
      static Singleton *sharedInstance = nil;
      static dispatch_once_t onceToken;
      dispatch_once(&amp;onceToken, ^{
          sharedInstance = [[Singleton alloc] init];
          // Do any other initialisation stuff here
          array = [[NSMutableArray alloc]init];
      });
      return sharedInstance;
  }
  </code></pre>