美文网首页
iOS 录屏功能开始录制失败

iOS 录屏功能开始录制失败

作者: liang1030 | 来源:发表于2021-05-14 14:17 被阅读0次

    问题:在开发录屏功能时报如下错误:

    2021-05-14 10:51:51.213305+0800 ScreenRecorderDemo[3316:1068581] -[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UIWindow: 0x101406310; frame = (0 0; 375 812); gestureRecognizers = <NSArray: 0x281d55da0>; layer = <UIWindowLayer: 0x2813365a0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.
    2021-05-14 10:51:51.232177+0800 ScreenRecorderDemo[3316:1068736]  [ERROR] -[RPScreenRecorder startRecordingWithHandler:]_block_invoke_2:295 failed to start due to error: Error Domain=com.apple.ReplayKit.RPRecordingErrorDomain Code=-5803 "开始录制失败" UserInfo={NSLocalizedDescription=开始录制失败}
    

    原因:使用Main.storyboard的方式作为程序的入口,并且在AppDelegate中添加了UIWindow

    解决:去掉AppDelegate中添加的UIWindow,或者不使用Main.storyboard

    相关文章

      网友评论

          本文标题:iOS 录屏功能开始录制失败

          本文链接:https://www.haomeiwen.com/subject/mdsqjltx.html