Search code examples
iosobjective-cxcodeios6.1

Error occurs in one project, not in a partially replicated second project. Related to playing multimedia


I have two projects. In them I am trying to play video with either AVPlayer or MPMoviePlayerController.

In the one large project that I've been developing in for a few months, I've added a new screen, a button, and code to display the video. Pressing the button displays the video. It did not work; the video displays a "loading..." for a second and then the application breaks, showing me the main method - highlighting this line:

return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppAppDelegate class]));

In the second project which I've just created, I mimic the new screen, button, and code exactly that I just tried adding to the first project. This project displays the video perfectly. The first project fails with either AVPlayer or MPMoviePlayerController, the second works fine with either.

I've made the new screen in the first project the initial view controller, with the same failing result.

I'm not sure what information to show you. The debug console? The frameworks I have included in one but not the other?

I'm at wits end trying to figure this out, the slightest suggestion would mean a lot.


Solution

  • I don't know what you mean by application breaks, it's crashing or it's just paused ?. I had a similar problem on one of my project and the problem was caused by the breakpoint set on all exceptions, it seems that the MPMoviePlayerController throws some exceptions while playing the movie but they are handled properly but the breakpoints stop the app in some strage places