Recording iphone screen while running app on xcode
To take a screenshot, use the screenshot operation:
xcrun simctl io booted screenshot
To record a video, use the recordVideo operation:
xcrun simctl io booted recordVideo <VideoFILENAME>.<extension>
UPDATE
Using the new release of Xcode 12.5 you can simply record the simulator screen using ⌘ + R.
or as bellow:
- Launch Simulator app.
- Open File menu > Record Screen
- Recording indicator will show up on the upper right of the title bar. You can begin your recording after the indicator showing up.
source
Yes, open quicktime and next.. ⌘ + ⌥ + N, in the screen click on the record button arrow and choose your device.
EDIT: from iOS 11 you can record the iPhone screen enabling the screen record.
- Launch Settings, and select Control Center.
- Add Screen Recording.
- Swipe-up from the bottom of the display to reveal Control Center.
- Tap Screen Recording button.
Use QuickTimePlayer:
- Connect iDevice to Mac.
- Open QuickTime
- File > New Movie Recording
- If you don't see your screen mirrored immediately, go to the dropdown arrow next to the record button and select Camera > iDevice
If you are recording from iOS Simulator:
- Start everything up in iOS Simulator
- Open QuickTime
- File > New Screen Recording
- Press record button. You will now be given the option to drag out an area of the screen to record.