Tyroner
Aspiring developer
Profile
Posts: 175
Reg: Dec 26, 2012
Johannesburg, S...
4,200
09/15/16 01:00 AM (7 years ago)

Xcode 8 Error

I get the following errors when trying to run Buzztouch apps on simulator in Xcode 8: Unknown type name 'MPMoviePlayerViewController'; did you mean 'AVPlayerViewController'? Unknown receiver 'MPMoviePlayerViewController'; did you mean 'AVPlayerViewController'? No visible @interface for 'AVPlayerViewController' declares the selector 'initWithContentURL:' Anybody else getting these? Tyrone
 
gatorcade
Code is Art
Profile
Posts: 35
Reg: Jul 17, 2011
Gainesville
1,150
like
09/15/16 09:11 AM (7 years ago)
Me too. :(
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
09/15/16 12:50 PM (7 years ago)
In BT_Layout/BT_viewController.m around line 986: Change from this; //show movie player controller... if(escapedUrl != nil){ [BT_debugger showIt:self message:[NSString stringWithFormat:@"Showing moving player controller%@", @""]]; MPMoviePlayerViewController *moviePlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:escapedUrl]; [moviePlayerController setModalTransitionStyle:UIModalTransitionStyleCrossDissolve]; //get the navigation controller... //BT_navController *tmpController = [appDelegate getNavigationController]; //[tmpController presentModalViewController:moviePlayerController animated:YES]; //[self.navigationController presentModalViewController:moviePlayerController animated:YES]; [self presentViewController:moviePlayerController animated:TRUE completion:^{}]; } To This; //show movie player controller... if(escapedUrl != nil){ [BT_debugger showIt:self message:[NSString stringWithFormat:@"Showing moving player controller%@", @""]]; AVPlayerViewController *moviePlayerController = [[AVPlayerViewController alloc] init]; [moviePlayerController setModalTransitionStyle:UIModalTransitionStyleCrossDissolve]; //get the navigation controller... //BT_navController *tmpController = [appDelegate getNavigationController]; //[tmpController presentModalViewController:moviePlayerController animated:YES]; //[self.navigationController presentModalViewController:moviePlayerController animated:YES]; [self presentViewController:moviePlayerController animated:TRUE completion:^{}]; } Give it a shot.
 
Pogden
Aspiring developer
Profile
Posts: 19
Reg: Sep 03, 2011
Surrey
1,490
like
09/19/16 12:42 AM (7 years ago)
Did you get this to work?
 
AussieRyan
Aspiring developer
Profile
Posts: 148
Reg: Mar 21, 2012
Margate, QLD Au...
1,480
like
09/19/16 03:13 AM (7 years ago)
It did work for me.
 
Tyroner
Aspiring developer
Profile
Posts: 175
Reg: Dec 26, 2012
Johannesburg, S...
4,200
like
09/20/16 12:45 PM (7 years ago)
Worked for me too. Thanks Red Dog!
 
KozmoWeb
Aspiring developer
Profile
Posts: 342
Reg: Dec 08, 2012
Sarasota, FL
8,520
like
09/25/16 09:47 AM (7 years ago)
I just upgraded to xCode 8 and this fixed my problem too! Thanks so much @RedDog! One note: The line breaks are really important. Be sure to keep each command on its own line without a line break. A simple copy and paste of this code from the post above didn't work without cleaning up the unwanted line breaks. -William @KozmoWeb
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.