0

I want to start recording in my App, I am using ReplayKit

func startRecordn(){
        recorder.startRecording{ [unowned self] (error) in
            //2
            guard error == nil else {
                print("There was an error starting the recording.")
                return
            }

            //3
            print("Started Recording Successfully")
        }
    }

Every time, I get the error

Domain=com.apple.ReplayKit.RPRecordingErrorDomain Code=-5803 "Recording failed to start" UserInfo={NSLocalizedDescription=Recording failed to start} There was an error starting the recording.

1 Answers1

0

Finally found the issue, in my AppDelegate, below code created issue, I commented it and got the permission prompt

    if #available(iOS 13, *) {
        window = UIWindow(frame: UIScreen.main.bounds)