title: If NSString stringWithContentsOfFile is deprecated, what is its replacement?
body: <p>I have some sample code from Tuaw which is probably 3 releases old ;)  The compiler is issuing a warning that the method is deprecated, but I do not see that mentioned in the SDK docs.  If it is deprecated, there must be an alternative approach or replacement method.  Does anyone know what the replacement is for this method?</p>
  
  <p>The specific code was:</p>
  
  <pre><code>NSArray *crayons = [[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"crayons" ofType:@"txt"]] componentsSeparatedByString:@"\n"];
  </code></pre>
  
  <p>The modified code (in discrete idiot steps - and no error handling) is:</p>
  
  <pre><code>NSError *error;
  NSString *qs = [[NSBundle mainBundle] pathForResource: @"crayons" ofType: @"txt"];
  NSString *ps = [[NSString alloc] stringWithContentsOfFile:qs encoding:NSUTF8StringEncoding error: &amp;error];
  NSArray *crayons = [[NSArray alloc] arrayWithContentsOfFile: ps];               
  </code></pre>