HowTo: Preview Mobile Screen on Desktop
While doing mobile development there is always a need to present or capture your screen (for bug description) with an application actively running on the screen. Here are my tips and apps I use often that help me to achive that goal for both platforms. I hope you will also find them useful.
iOS
While using iOS devices, both features are already build into the system.
To present mobile screen on desktop:
- connect your device via USB
- run
QuickTime Player
application - from menu run:
File > New Movie Recording
- select your mobile as a video source (in my case
Tytan
) using the drop-down next to the recording button
To capture the video of your device:
- swipe down from right-top of the screen
- use the recodring button
Android
Here the things need to use some 3rd party software, but it’s also pretty easy doable.
To capture the screen on device, you can use this application:
Once runnig, it will create an overlay button above all apps that will let you start a recording.
To preview the screen - take a look on the scrcpy, which works great on macOS and Windows desktops. It’s enough to install it via command:
$ brew install scrcpy
Then enable application debugging
in Developer Options
on the device itself. And once the Android device is connected via USB, run in terminal scrcpy
to start a preview window. There are additional command-line arguments that let to record the video or change the codec. Find the manual here.