RPScreenRecorder stopRecording block does not receive a call

I searched enough, but could not find a solution.

I am using ReplayKit to record the screen of my application. I started recording the screen by calling

let sharedRecorder = RPScreenRecorder.shared() sharedRecorder.startRecording() { error in if let error = error { self.showScreenRecordingAlert(message: error.localizedDescription) } } 

When I press the stopRecord button, I call

 let sharedRecorder = RPScreenRecorder.shared() sharedRecorder.stopRecording { previewViewController, error in if let error = error { self.showScreenRecordingAlert(message : error.localizedDescription) return } } 

But the problem I ran into is that the software control is not part of the stopRecording block. When I do po sharedRecorder.isRecording , it always returns false. I did everything I know, but could not find a solution.

+4
source share

Source: https://habr.com/ru/post/1258189/


All Articles