title: pathForResource dynamic input
body: <p>I am trying to write code with dynamic input for pathForResource but I get null value for the directory listing. the files I am using are wav files. Here is the code. I have a.wav file in the project folder. What is wrong here? how can I make this work? Please help.</p>
  
  <pre><code>int alphanum = 97;
  
  NSString *alphastring = [NSString stringWithFormat:@"%i",alphanum];
  NSString *path = [[NSBundle mainBundle] pathForResource:alphastring ofType:@"wav"];
  
  AVAudioPlayer *theplayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
  
  [theplayer play];
  </code></pre>