title: NSURL is null in Simulator, but okay on iPad
body: <p>I'm trying to load an audio file into AVAudioPlayer on the iPad. When I run it on the iPad it finds it in the bundle fine. However, if I try and run it through the simulator, I get a null error for NSURL. Here's the snippet of code (num is an arbitrary int):</p>
  <pre><code>NSString *name = [NSString stringWithFormat:@&quot;st-answermachine-%i&quot;, num];
  NSLog(@&quot;name = %@&quot;, name);
  NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:@&quot;m4a&quot;];
  NSLog(@&quot;path = %@&quot;, path);
  NSURL *url = [NSURL URLWithString:path];
  NSLog(@&quot;url = %@&quot;, url);
  </code></pre>
  <p>In the simluator, the Debugger Console traces this:</p>
  <blockquote>
  <p>name = st-answermachine-1</p>
  <p>path = /Users/joe/Library/Application Support/iPhone Simulator/3.2/Applications/B85E9CC8-6E39-47B9-XXXX-1E3A2CE145D1/MyApp.app/st-answermachine-1.m4a</p>
  <p>url = (null)</p>
  </blockquote>
  <p>But if I try it on the device, I get this:</p>
  <blockquote>
  <p>name = st-answermachine-1</p>
  <p>path = /var/mobile/Applications/116DA1CB-EA13-4B80-XXXX-EBD46C8E2095/MyApp.app/st-answermachine-1.m4a</p>
  <p>url = /var/mobile/Applications/116DA1CB-EA13-4B80-XXXX-EBD46C8E2095/MyApp.app/st-answermachine-1.m4a</p>
  </blockquote>
  <p>Any ideas why I might have this problem please?</p>
  <p>Thanks!</p>