Skip to content

Instantly share code, notes, and snippets.

@Kilo-Loco
Created August 4, 2020 20:11
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kilo-Loco/631b938dcd88ea60ff604ffd16d4dd55 to your computer and use it in GitHub Desktop.
Save Kilo-Loco/631b938dcd88ea60ff604ffd16d4dd55 to your computer and use it in GitHub Desktop.
Bash script for recording Xcode Simulator
#!/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