startuprob
startuprob

Reputation: 1915

Getting a weird MPMoviePlayerViewController error

- (void)viewDidLoad {
    NSString *url = [[NSBundle mainBundle] pathForResource:@"IsleRoyale" ofType:@"mp4"];
    MPMoviePlayerViewController* moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:url]];
    moviePlayerViewController.view.backgroundColor = [UIColor blackColor];
    [self presentMoviePlayerViewControllerAnimated:moviePlayerViewController];
    [moviePlayerViewController play];
    [moviePlayerViewController release];  
    [super viewDidLoad];
}

Keeps giving me an error that says: " "_OBJC_CLASS_$_MPMoviePlayerViewController", referenced from:

  objc-class-ref-to-MPMoviePlayerViewController in VideoVC.o

ld: symbol(s) not found collect2: ld returned 1 exit status

I have never added video to a project so I could be doing something wrong but I can't figure it out. I have heard that only iOS 3.2 and later can run video like this so I have already set the deployment target to iOS 4.1, the project format to Xcode 3.2, and the base SDK to 4.1. Any thoughts?

Upvotes: 1

Views: 1012

Answers (1)

Nava Carmon
Nava Carmon

Reputation: 4533

Connect the MediaPlayer.framework, which makes the use of MPMoviePlayerViewController. The linker couldn't find its symbol.

Upvotes: 3

Related Questions