I use the replay kit to save video on the screen during the game, but by chance startRecordingWithMicrophoneEnabled and recorder.stopRecordingWithHandler never enters the completion handler
it does not throw an error, it just starts and freezes indefinitely.
if recorder.available && recorder.microphoneEnabled { recorder.startRecordingWithMicrophoneEnabled(true) { [unowned self] (error) in if let unwrappedError = error { print(unwrappedError.localizedDescription) } else { print("called") self.manager.instructions.text = "Click to Start Game" } } } if recorder.available && recorder.microphoneEnabled { print("initiating stop recording") recorder.stopRecordingWithHandler { [unowned self] (RPPreviewViewController, error) in print("in completion handler") if let previewView = RPPreviewViewController { print("will transition to gameplay video") previewView.previewControllerDelegate = self self.presentViewController(previewView, animated: true, completion: nil) self.sessionHandler.session.stopRunning() } } }
source share