iOS and Yosemite allow you to use QuickTime to record your iPhone or iPad screen without using any third party software.
1. Plug in iPhone with a Lightning cable
2. Open QuickTime
3. Choose File > New Movie Recording
4. Click the menu arrow icon that appears to the right of the QuickTime Record button
5. Below Camera, choose your iPhone's name.
6. Your iPhone's screen will appear, press record.