MPMoviePlayerViewController在调试时工作正常但在iOS9上发布时崩溃

时间:2015-10-15 06:58:08

标签: ios objective-c ios9 mpmovieplayercontroller

MPMoviePlayerViewController适用于调试,但在iOS9

上发布时崩溃
MPMoviePlayerViewController *playerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:url];
self.navigationController presentMoviePlayerViewControllerAnimated:playerViewController];

我的url不是零。

它在ios9中的debug时正常工作,但在release时发生崩溃,xcode7说:

  

2015-10-15 14:53:04.808 ******** [5110:1680634] NSScanner:零字符串   论证2015-10-15 14:53:04.808 ******** [5110:1680634] NSScanner:   nil字符串参数libc ++ abi.dylib:terminate_handler意外   抛出异常

1 个答案:

答案 0 :(得分:1)

对于iOS9,不推荐使用MPMoviePlayerController,你应该使用AVPlayerController!