title: iOS mainBundle not loading resources
body: <p>I had a working iOS project, and whilst working on a git branch, the project would suddenly not load any resources from the main Bundle...I'm loading an audio file for a simple AVAudioPlayer with:</p>
  
  <pre><code>NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/nadamintrov1.aif", [[NSBundle mainBundle] resourcePath]]];
  NSError *error;
  NSLog(@"%@", url);
  splashScreenAudioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&amp;error];
  </code></pre>
  
  <p>and in other ViewControllers I'm also loading other files such as:</p>
  
  <pre><code>    patch = [PdBase openFile:@"klangfarbe6ep.pd" path:[[NSBundle mainBundle] resourcePath]];
  if (!patch) {
      NSLog(@"Failed to open patch!");
      // Gracefully handle failure...
  }
  </code></pre>
  
  <p>but whilst both those worked just fine before, now I get "couldn't initialise splash audio player" and for the patch:</p>
  
  <pre><code>open: /var/mobile/Applications/464B65AD-9E2C-42C9-8BBA-12AFD0D48393/Nadam.app/klangfarbe6ep.pd: No such file or directory
  </code></pre>
  
  <p>klangfarbe6ep.pd: No such file or directory
  2012-02-26 12:07:17.332 Nadam[520:707] Failed to open patch!</p>
  
  <p>which is weird...I mean the NSLog(@"%@", url); I put up for the AudioPlayer clearly returns:</p>
  
  <pre><code>2012-02-26 12:06:49.127 Nadam[520:707] file://localhost/var/mobile/Applications/464B65AD-9E2C-42C9-8BBA-12AFD0D48393/Nadam.app/nadamintrov1.aif
  </code></pre>
  
  <p>so why on earth isn't it loading it? Diff from git over the last few changes don't show anything in the project file that I can see as corruption...</p>
  
  <p>anyone had that happen to them before? any way of debugging it? I read this thread:</p>
  
  <p><a href="https://stackoverflow.com/questions/5106409/what-is-the-alternative-of-nsbundle-mainbundle-urlforresourcewithextension-i">What is the alternative of [NSBundle mainBundle] URLForResource:withExtension: in iOS 3 SDK</a></p>
  
  <p>But can't understand why it was working before and not now with no project changes...</p>