MPMoviePlayerViewController won't play movie, start and closes immediately
I'm trying to play a video with MPMoviePlayerViewController, I present the MPMoviePlayerViewController but after 1 second he is dismissing itself. This is my code: .h: #import <MediaPlayer/MediaPlayer.h> @property (strong, nonatomic) MPMoviePlayerViewController *moviePlayerViewController; .m: - (void)playmovie { NSString *databaseName = @"NO.mp4"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentDir = [documentPaths objectAtIndex:0]; NSString *databasePath = [documentDir stringByAppendingPathComponent:databaseName];