Fix iOS screen recording

Summary: It looks like the iOS simulator screen recording tool expects a SIGINT instead of a SIGKILL (the default of node's ChildProcess.kill()) to indicate it should stop recording, save the video file and die cleanly.

Reviewed By: danielbuechele

Differential Revision: D9480678

fbshipit-source-id: 5f17bd288c7622ffa3c337cef311e5e4e462218a
This commit is contained in:
Tim Isganitis
2018-08-23 09:11:39 -07:00
committed by Facebook Github Bot
parent 715d12db8d
commit f560f770b6

View File

@@ -232,7 +232,7 @@ class ScreenCaptureButtons extends Component<Props, State> {
if (selectedDevice instanceof AndroidDevice) { if (selectedDevice instanceof AndroidDevice) {
this.executeShell(selectedDevice, `pgrep 'screenrecord' -L 2`); this.executeShell(selectedDevice, `pgrep 'screenrecord' -L 2`);
} else if (this.iOSRecorder && videoPath) { } else if (this.iOSRecorder && videoPath) {
this.iOSRecorder.kill(); this.iOSRecorder.kill('SIGINT');
this.setState({ this.setState({
recording: false, recording: false,
}); });