This works in Yosemite and above. Simply connect your iPhone with a lightning cable to your Mac and open QuickTime Player.
Then go to the File menu and click New Movie Recording.

This will bring up the movie recorder. Click the down arrow next to the recording button and select your iPhone as the Camera and Microphone source. You can also change the quality with this menu.

To record, just click the big red record button. This will start capturing your iPhone's screen right away. To stop, click the record button again and save the video.
Here's a video I recorded as an example, it shows off Fallout Shelter's 3D Parallax effect.
-i