title: Sound not playing with AVAudioPlayer in iOS Simulator
body: <p>Pretty new to Objective-C and programming in Xcode and I can't quite understand why my sound is not playing. I followed this tutorial (<a href="http://www.youtube.com/watch?v=2mbCkIVF1-0" rel="nofollow">http://www.youtube.com/watch?v=2mbCkIVF1-0</a>) but for some reason I cannot get my sounds to play in the iOS Simulator. I am using a storyboard layout rather than a nib file so maybe that could be the problem ? I know how to connect my buttons to the storyboards that I have so I'm pretty confused and this problem is driving me crazy. Any help is greatly appreciated, if my code is wrong please point me in the right direction, the problem might be something trivial, either way any help would be great! Thanks again</p>
  
  <p>SFViewController.m</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;AVFoundation/AVAudioPlayer.h&gt;
  
  
  @interface SFViewController : UIViewController &lt;AVAudioPlayerDelegate&gt; {
  
  }
  -(IBAction)playSound1;
  -(IBAction)playSound2;
  -(IBAction)playSound3;
  
  @end
  </code></pre>
  
  <p>SFViewController.h</p>
  
  <pre><code>#import "SFViewController.h"
  #import &lt;AVFoundation/AVAudioPlayer.h&gt;
  
  
  @implementation SFViewController
  
  
  
  -(IBAction)playSound1 {
  
      NSString *path = [[NSBundle mainBundle] pathForResource:@"SeriouslyFunnySound1" ofType:@"wav"];
      AVAudioPlayer* theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path]error:NULL];
  
      theAudio.delegate = self;
      [theAudio play];
  }
  
  -(IBAction)playSound2 {
  
      NSString *path = [[NSBundle mainBundle] pathForResource:@"SeriouslyFunnySound2" ofType:@"wav"];
      AVAudioPlayer* theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path]error:NULL];
  
      theAudio.delegate = self;
      [theAudio play];
  }
  
  -(IBAction)playSound3 {
  
      NSString *path = [[NSBundle mainBundle] pathForResource:@"SeriouslyFunnySound3" ofType:@"wav"];
      AVAudioPlayer* theAudio = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path]error:NULL];
  
      theAudio.delegate = self;
      [theAudio play];
  }
  </code></pre>