This process only works on MAC OS - El Capitan and above.
- Open Quicktime player.
- Click on FILE -> New Movie Recording -> You'll see a small inverted arrow next to RECORD Button. Click on that and select the iPhone name present there.
- You will see the iPhone screen there and can record whatever you wish to record.
Its as simple as stated here.
MacBook
Pro, OS X El Capitan (10.11.6)