Postado 3 de maio de 201214 anos comment_303724 Fala pessoal, Tudo bem? Sou totalmente novato em desenvolvimento de apps, estou tentando colocar um vídeo no meu projeto, feito no XCode 4.3. Eu segui exatamente esse tutorial: Só que quando mando rodar ele, dá erro. #import <UIKit/UIKit.h> #import "AppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } o erro dá nesse return Thread 1: signal SIGABTR E no Output dá isso: 2012-05-03 17:19:34.461 canaisIpad[8014:11f03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter' *** First throw call stack: (0x1e0a022 0x1348cd6 0x1db2a48 0x1db29b9 0xb9753b 0xb974c5 0x1dbc 0x1e0be99 0x25814e 0x2580e6 0x2feade 0x2fefa7 0x2fdd8a 0x27d2cf 0x27d5e6 0x263dc4 0x257634 0x16ecef5 0x1dde195 0x1d42ff2 0x1d418da 0x1d40d84 0x1d40c9b 0x16eb7d8 0x16eb88a 0x255626 0x206d 0x1d15 0x1) terminate called throwing an exception Alguém pode me dar uma mão? Ah, a única diferença do tutorial que vi e o que fiz é que estou fazendo para iPad esse vídeo ensina para iPhone, não sei se tem algo a ver! Obrigado Denunciar
Postado 4 de maio de 201214 anos comment_303932 A mensagem de erro diz que você esta passando uma string nula como parametro para o nome do arquivo, cole a parte do codigo que abre o video Denunciar
Postado 7 de maio de 201214 anos Autor comment_304428 Fala Hercules, tudo bem? Esse são meus arquivos: arquivo.m #import "AutoAtendimento.h" @interface AutoAtendimento () @end @implementation AutoAtendimento - (IBAction)playVideo { // [playButton setImage:playButtonImage forState:UIControlStateNormal]; NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Video/01_11_2011_10_17_30" ofType:@"mp4"]]; MPMoviePlayerViewController *moviePlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; [self presentMoviePlayerViewControllerAnimated:moviePlayerController]; moviePlayerController.moviePlayer.movieSourceType = MPMovieSourceTypeFile; [moviePlayerController.moviePlayer play]; moviePlayerController = nil; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } @end arquivo.h #import <UIKit/UIKit.h> #import <MediaPlayer/MediaPlayer.h> @interface AutoAtendimento : UIViewController - (IBAction)playVideo; @end Denunciar
Postado 7 de maio de 201214 anos comment_304467 Está acontecendo a mesma coisa comigo, me ajudem tbm pessoal. Denunciar
Participe do debate
Você pode postar agora e se registrar depois. Se você tem uma conta, entre agora para postar com ela.