I am following a previous question on this topic trying to get a video to play inside my app. I have copied the video called iobserve1.mov into the resources folder and in my h file I import MediaPlayer/MediaPlayer.h. I am getting the following errors:
Apple Mach-O Linker Error "_OBJC_CLASS_$_MPMoviePlayerController", referenced from:
and
Apple Mach-O Linker Error linker command failed with exit code 1 (use -v to see invocation)
@interface ObViewControllerIObserveMovie ()
@property (weak, nonatomic) IBOutlet UIView *movieView; // this should point to a view where the movie will play
@end
@implementation ObViewControllerIObserveMovie
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *moviePath = [[NSBundle mainBundle] pathForResource:@"iobserve1" ofType:@"mov"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:moviePath]];
player.view.frame = CGRectMake(184, 200, 400, 300);
[self.view addSubview:player.view];
[player play];
}
Any help here would be much appreciated.