Проблема MPMoviePlayerViewController - PullRequest
       0

Проблема MPMoviePlayerViewController

2 голосов
/ 03 сентября 2010

Как я могу воспроизвести фильм в моем приложении?Я пытался использовать этот код, но xcode выдает мне эту ошибку:

NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"welcome" ofType:@"mp4"];
NSURL  *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
movieView = [[MPMoviePlayerViewController alloc] initWithContentURL: movieURL];
theMovie = [movieView moviePlayer];
theMovie.scalingMode = MPMovieScalingModeAspectFit;
theMovie.fullscreen = TRUE;
theMovie.controlStyle = MPMovieControlStyleNone;
theMovie.shouldAutoplay = TRUE;

[[[UIApplication sharedApplication] keyWindow] addSubview: movieView.view];   

ОШИБКА

ld: warning: in /Users/Rushil/Documents/StickDeath/MediaPlayer.framework/MediaPlayer, missing required architecture i386 in file
Undefined symbols:
  "_OBJC_CLASS_$_MPMoviePlayerViewController", referenced from:
      objc-class-ref-to-MPMoviePlayerViewController in StickDeathViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

1 Ответ

1 голос
/ 03 сентября 2010

Обратите внимание, что MPMoviePlayerViewController доступен только на iOS3.2 и более поздних версиях

Проверьте это дважды, я думаю, что это проблема. Подробнее о MPMoviePlayerViewController

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...