Closed andy1xx8 closed 4 years ago
Hi, I'm having this issue. It's because MPMoviePlayerViewController was removed from iOS 13 completely. We have to use AVPlayerViewController instead. This is the logs
[+1556 ms] [DEVICE LOG] 2019-08-22 16:10:46.849785+0700 localhost Runner[48682]: (CoreFoundation) Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'MPMoviePlayerViewController is no longer available. Use AVPlayerViewController in AVKit.' [ ] [DEVICE LOG] First throw call stack: [ ] [DEVICE LOG] ( [ ] [DEVICE LOG] 0 CoreFoundation 0x00007fff23af9c3e exceptionPreprocess + 350 [ ] [DEVICE LOG] 1 libobjc.A.dylib 0x00007fff50131de0 objc_exception_throw + 48 [ ] [DEVICE LOG] 2 CoreFoundation 0x00007fff23af9a7c +[NSException raise:format:] + 188 [ ] [DEVICE LOG] 3 MediaPlayer 0x00007fff27646fb9 -[MPMoviePlayerViewController initWithContentURL:] + 94 [ ] [DEVICE LOG] 4 XCDYouTubeKit 0x000000010b528cbf -[XCDYouTubeVideoPlayerViewController initWithVideoIdentifier:] + 495 [ ] [DEVICE LOG] 5 flutter_youtube 0x000000010b59721d +[FlutterYoutubePlugin playVideo:] + 77 [ ] [DEVICE LOG] 6 flutter_youtube 0x000000010b5970d3 46+[FlutterYoutubePlugin registerWithRegistrar:]_block_invoke + 643 [ ] [DEVICE LOG] 7 Flutter 0x000000010948ac79 45-<…> [ +10 ms] *** First throw call stack: [ ] ( [ ] 0 CoreFoundation 0x00007fff23af9c3e exceptionPreprocess + 350 [ ] 1 libobjc.A.dylib 0x00007fff50131de0 objc_exception_throw + 48 [ ] 2 CoreFoundation 0x00007fff23af9a7c +[NSException raise:format:] + 188 [ ] 3 MediaPlayer 0x00007fff27646fb9 -[MPMoviePlayerViewController initWithContentURL:] + 94 [ ] 4 XCDYouTubeKit 0x000000010b528cbf -[XCDYouTubeVideoPlayerViewController initWithVideoIdentifier:] + 495 [ ] 5 flutter_youtube 0x000000010b59721d +[FlutterYoutubePlugin playVideo:] + 77 [ ] 6 flutter_youtube 0x000000010b5970d3 46+[FlutterYoutubePlugin registerWithRegistrar:]_block_invoke + 643 [ ] 7 Flutter 0x000000010948ac79 45-<…> [ +129 ms] Service protocol connection closed. [ ] Lost connection to device. [ +1 ms] DevFS: Deleting filesystem on the device
I fix the error: https://github.com/vico-aguado/FlutterYoutube
1.3.5 is live on pub.dev
Hi, I'm having this issue. It's because MPMoviePlayerViewController was removed from iOS 13 completely. We have to use AVPlayerViewController instead. This is the logs
[+1556 ms] [DEVICE LOG] 2019-08-22 16:10:46.849785+0700 localhost Runner[48682]: (CoreFoundation) Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'MPMoviePlayerViewController is no longer available. Use AVPlayerViewController in AVKit.' [ ] [DEVICE LOG] First throw call stack: [ ] [DEVICE LOG] ( [ ] [DEVICE LOG] 0 CoreFoundation 0x00007fff23af9c3e exceptionPreprocess + 350 [ ] [DEVICE LOG] 1 libobjc.A.dylib 0x00007fff50131de0 objc_exception_throw + 48 [ ] [DEVICE LOG] 2 CoreFoundation 0x00007fff23af9a7c +[NSException raise:format:] + 188 [ ] [DEVICE LOG] 3 MediaPlayer 0x00007fff27646fb9 -[MPMoviePlayerViewController initWithContentURL:] + 94 [ ] [DEVICE LOG] 4 XCDYouTubeKit 0x000000010b528cbf -[XCDYouTubeVideoPlayerViewController initWithVideoIdentifier:] + 495 [ ] [DEVICE LOG] 5 flutter_youtube 0x000000010b59721d +[FlutterYoutubePlugin playVideo:] + 77 [ ] [DEVICE LOG] 6 flutter_youtube 0x000000010b5970d3 46+[FlutterYoutubePlugin registerWithRegistrar:]_block_invoke + 643 [ ] [DEVICE LOG] 7 Flutter 0x000000010948ac79 45-<…> [ +10 ms] *** First throw call stack: [ ] ( [ ] 0 CoreFoundation 0x00007fff23af9c3e exceptionPreprocess + 350 [ ] 1 libobjc.A.dylib 0x00007fff50131de0 objc_exception_throw + 48 [ ] 2 CoreFoundation 0x00007fff23af9a7c +[NSException raise:format:] + 188 [ ] 3 MediaPlayer 0x00007fff27646fb9 -[MPMoviePlayerViewController initWithContentURL:] + 94 [ ] 4 XCDYouTubeKit 0x000000010b528cbf -[XCDYouTubeVideoPlayerViewController initWithVideoIdentifier:] + 495 [ ] 5 flutter_youtube 0x000000010b59721d +[FlutterYoutubePlugin playVideo:] + 77 [ ] 6 flutter_youtube 0x000000010b5970d3 46+[FlutterYoutubePlugin registerWithRegistrar:]_block_invoke + 643 [ ] 7 Flutter 0x000000010948ac79 45-<…> [ +129 ms] Service protocol connection closed. [ ] Lost connection to device. [ +1 ms] DevFS: Deleting filesystem on the device