Skip to content

Instantly share code, notes, and snippets.

View nghiepnguyen's full-sized avatar

Nghiệp Nguyễn nghiepnguyen

View GitHub Profile
@thanhzusu
thanhzusu / screen-shot-by-xcrun-command-line.txt
Last active November 13, 2023 14:55
Take a screenshot or video by Xcode command-line
For Xcode 8.2 or later
You can take videos and screenshots of Simulator using the xcrun Xcode command-line utility.
1. Run your app on the simulator.
2. Open Terminal.app
3. Run the command
- To take a screenshot, xcrun simctl io booted screenshot
- To take a video, xcrun simctl io booted recordVideo <filename>.<file extension>.
For example: xcrun simctl io booted recordVideo appvideo.mov