title: How to play a movie on iOS
body: <p>So I created a view that has a button in it that will play the movie.</p>
  
  <p>Here is the action for that button:</p>
  
  <pre><code>- (IBAction)playMovie {
  
      NSBundle *bundle = [NSBundle mainBundle];
      NSString *moviePath = [bundle pathForResource:@"sample_iPod" ofType:@"m4v"];
      NSURL *movieURL = [NSURL fileURLWithPath:moviePath];
      MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
      theMovie.scalingMode = MPMovieScalingModeAspectFill;
      [theMovie play];
  }
  </code></pre>
  
  <p>However when I test the App and try to play the video the screen stays blank and in the log it shows this:</p>
  
  <p>[Switching to process 9333 thread 0x13c03]</p>
  
  <p>Any Idea what's up?</p>
  
  <p>Thanks</p>