title: playing video in iOS 5
body: <p>I am trying to follow this tutorial <a href="http://www.techotopia.com/index.php/Video_Playback_from_within_an_iOS_5_iPhone_Application" rel="nofollow">link</a>, but i have issues. Can somebody please have a look and let me know what needs to be changed. 
  I tried to looking up other examples but none seems to work. Please let me know what needs to be changed.</p>
  
  <p>The following is the error </p>
  
  <p>Undefined symbols for architecture i386:
    "_OBJC_CLASS_$_MPMoviePlayerController", referenced from:
        objc-class-ref in VideoScreenViewController.o
    "_MPMoviePlayerPlaybackDidFinishNotification", referenced from:
        -[VideoScreenViewController playVideo:] in VideoScreenViewController.o
        -[VideoScreenViewController moviePlayBackDidFinish:] in VideoScreenViewController.o
  ld: symbol(s) not found for architecture i386
  clang: error: linker command failed with exit code 1 (use -v to see invocation)</p>
  
  <p>Here is the code</p>
  
  <pre><code>//  VideoScreenViewController.h
  
  #import &lt;UIKit/UIKit.h&gt;
  #import "MediaPlayer/MediaPlayer.h"
  @interface VideoScreenViewController : UIViewController
  
  @property (strong, nonatomic) MPMoviePlayerController *moviePlayer;
  
  - (IBAction)playVideo:(id)sender;
  
  @end
  
      }
  
  
  #import "VideoScreenViewController.h"
  #import "MediaPlayer/MediaPlayer.h"
  @interface VideoScreenViewController ()
  
  @end
  
  @implementation VideoScreenViewController
  
  @synthesize moviePlayer;
  
  - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  {
      self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
      if (self) {
          // Custom initialization
      }
      return self;
  }
  
  - (void)viewDidLoad
  {
      self.view.backgroundColor = [UIColor clearColor];
      [super viewDidLoad];
      // Do any additional setup after loading the view.
  }
  
  - (void)viewDidUnload
  {
      [super viewDidUnload];
      // Release any retained subviews of the main view.
  }
  
  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  {
      return (interfaceOrientation == UIInterfaceOrientationPortrait);
  }
  
  - (IBAction)playVideo:(id)sender {
  
          NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] 
                                               pathForResource:@"Movie" ofType:@"MOV"]];
          moviePlayer =  [[MPMoviePlayerController alloc]
                          initWithContentURL:url];
  
          [[NSNotificationCenter defaultCenter] addObserver:self
                                                   selector:@selector(moviePlayBackDidFinish:)
                                                       name:MPMoviePlayerPlaybackDidFinishNotification
                                                     object:moviePlayer];
  
          moviePlayer.controlStyle = MPMovieControlStyleDefault;
          moviePlayer.shouldAutoplay = YES;
          [self.view addSubview:moviePlayer.view];
          [moviePlayer setFullscreen:YES animated:YES];
  
  
  }
  
  
  - (void) moviePlayBackDidFinish:(NSNotification*)notification {
  
      NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] 
                                           pathForResource:@"Movie" ofType:@"MOV"]];
      MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:url];
      [[NSNotificationCenter defaultCenter] 
       removeObserver:self
       name:MPMoviePlayerPlaybackDidFinishNotification
       object:player];
  
      if ([player
           respondsToSelector:@selector(setFullscreen:animated:)])
      {
          [player.view removeFromSuperview];
      }
  }
  
  @end
  </code></pre>