title: How to access local files within project
body: <p>I want to add some static files (image, binary, etc...) to my app.  I've placed them under a folder named <code>Resources</code> and have added it to my XCode project.</p>
  
  <p>Next, I have those files added to the <code>Copy Bundle Resources</code> in the <code>Build Phases</code> tab in the project settings.</p>
  
  <p>However, I can't seem to refer to them in the right way.</p>
  
  <p>For instance, reading a binary file:</p>
  
  <pre><code>NSInputStream *is = [[NSInputStream alloc] initWithFileAtPath:@"data.bin"];
  if(![is hasBytesAvailable]) NSLog(@"wrong");
  </code></pre>
  
  <p>This always fails &amp; prints <code>wrong</code></p>
  
  <p>I tried a similar approach with <code>NSData initWithContentsOfFile:</code> but this wouldn't even execute.  Another attempt was to use <code>[NSBundle mainBundle]</code> but this also didn't execute fully.</p>
  
  <p>I'm new to iOS please help I can access my local files!  Any help would be appreciated.</p>
  
  <p>Thank you,</p>