title: Xcode: directory file for simulator Iphone
body: <p>i want to write a string in a file "file.txt": this file in my project (for Iphone) is inside Resources; I try to write a string in this file but it don't work, I show my code.</p>
  
  <pre><code> NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  NSString *documentsDirectory = [paths objectAtIndex:0];
  NSString *filePath =  [documentsDirectory stringByAppendingPathComponent:@"file.txt"];
  NSError *error;
  [outputString writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:&amp;error];
  </code></pre>
  
  <p>I want write in this file with simulator xcode, not with device</p>