Created
August 4, 2020 20:11
-
-
Save Kilo-Loco/631b938dcd88ea60ff604ffd16d4dd55 to your computer and use it in GitHub Desktop.
Bash script for recording Xcode Simulator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "🤔 Enter a video name:" | |
read name | |
name="${name}.mp4" | |
echo | |
echo "📹 Recording $name" | |
echo | |
xcrun simctl io booted recordVideo $name & | |
pid=$! | |
read -p "🎬 Press Enter to stop recording" | |
kill -2 $pid | |
echo | |
echo "📼 Stopped recording:" | |
cwd=$(pwd) | |
echo "${cwd}/${name}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment