title: URLForResource returns nil
body: <p>I'm in the process of learning how to use xcode and how to write applications for the Mac. </p>
  
  <p>So, I have a simple screensaver that loads an external file which works fine. I decided that it would be better to embed the html source in the application to reduce the external dependancies. </p>
  
  <p>I dragged the HTML file to the resources folder, it's at the top level there's no sub folder or anything.</p>
  
  <p><img src="https://i.stack.imgur.com/JpJFF.png" alt="resource added"></p>
  
  <p>I made sure the Add to targets had my application in it, along with selecting 'create folder references' and 'copy files if needed'. I use the following to get the url to the file, but it returns nil </p>
  
  <pre><code>    NSURL *fileUrl = [[NSBundle mainBundle] URLForResource:@"embedded" withExtension:@"html"];
  
  
   System Preferences[10185]: fileUrl returned (null) 
  </code></pre>
  
  <p>I've read through all the other SO issues for the similar problems but none of the fixes seem to apply. I've gone through and checked them. </p>
  
  <p>If I show the package contents of the final build the embedded.html is in there. Am I missing something really obvious?</p>
  
  <p><strong>edit to add</strong> </p>
  
  <p>In build phases it's listed in Copy Bundle Resources</p>
  
  <p><img src="https://i.stack.imgur.com/5XYD1.png" alt="enter image description here"></p>
  
  <p>xcode version is 6.1.1</p>