title: AVAudioPlayer mp3 file not playing
body: <p>I am an amateur developer making an ios app which includes a sound file (mp3) being played when a button impressed. However, the sound is not playing (tested on a mobile device, not ios simulator). I already have the sound file in bundle resources and have added AVFoundation to link binary with libraries. I have xcode 4.6 and have mac osx 10.8.4. Here is my code for viewcontroller.h:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;RevMobAds/RevMobAds.h&gt;
  #import &lt;AVFoundation/AVFoundation.h&gt;
  
  
  @interface ViewController : UIViewController 
  
  
  - (IBAction)playButton:(id)sender;
  - (IBAction)stopButton:(id)sender;
  
  @property (nonatomic, strong) AVAudioPlayer *avPlayer;
  
  - (void)revmob;
  @end
  </code></pre>
  
  <p>Viewcontroller.m:</p>
  
  <pre><code>#import "ViewController.h"
  #import &lt;RevMobAds/RevMobAds.h&gt;
  
  
  @interface ViewController ()
  
  @end
  
  @implementation ViewController
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      [[RevMobAds session] showBanner];
      // Do any additional setup after loading the view, typically from a nib.
      NSString *stringPath = [[NSBundle mainBundle] pathForResource:@"98648__dobroide__20100606-mosquito" ofType:@"mp3"];
      if (stringPath) 
      {
          NSURL *url = [NSURL fileURLWithPath:stringPath];
  
          NSError *error;
  
         _avPlayer = [[AVAudioPlayer alloc]initWithContentsOfURL:url error:&amp;error];
          if (!error) 
          {
              [_avPlayer setNumberOfLoops:-1];
          } 
          else  
          {
              NSLog(@"Error occurred: %@", [error localizedDescription]);
          }
      } 
      else 
      {
          NSLog(@"Resource not found");
      }
      [self performSelector:@selector(revmob) withObject:nil afterDelay:10.0];
  }
  
  - (void)revmob 
  {
      [[RevMobAds session] showFullscreen];
  }
  - (IBAction)playButton:(id)sender 
  {
      [_avPlayer play];
      NSLog(@"Sound playing");
  }
  
  - (IBAction)stopButton:(id)sender 
  {
      [_avPlayer pause];
      NSLog(@"Sound Stopped");
  }
  @end
  </code></pre>