To record iPhone or iPad output on your Mac, make sure you’re running OS X Yosemite and iOS 8. Then connect your iPhone or iPad to your Mac using a Lightning cable. Note that you may need to “Trust” your Mac before the iPhone will work.Launch QuickTime and select File > New Movie Recording from the menu bar. Alternatively, you can use the keyboard shortcut Option-Command-N. This will launch a new QuickTime window for video recording. By default, QuickTime will activate your Mac’s built-in iSight camera, but ignore that and find and click on the small downward-facing triangle next to the record button. This lets you select an alternate recording source, which now includes your iPhone or iPad.
When you’re done recording, just hit the stop button in the QuickTime preview window. You can then save the recording as a QuickTime movie (.mov) on your computer, or use the presets at File > Export to create a version optimized for certain resolutions or devices.