Record IOS Simulator video and simulator audio in background
You can achieve this by following.
1.In simulator Menu Choose Hardware > Audio Input > System to use the same audio input as the Mac.
2.Open Terminal and navigate to the directory where you want to save video.
Run Command : xcrun simctl io booted recordVideo <filename>.<extension>
It will start recording.To finish Press Control-C
. Video will save on current directory.