How do I AirPlay mirror my iPhone screen to my MacBook Pro? I am using a 13 inch Retina MacBook Pro with Mavericks and a iPhone 5s with iOS 7.

I want to record game tutorials. Where the game is running on my iOS device and I'm recording the tutorial via a screen capture of an AirPlay on my MacBook Pro.

After searching apps from the App Store, I found that there is no apps to record your screen and the only way is through AirPlay on your Mac or Apple TV. 

Is there any free and legal way to do do?

I have tried a trial of X mirage and it is just what I wanted, but it cost money. I want to record my iPhone. 

Note that I do not have any other apple devices.
If your devices have OS X Yosemite and iOS 8 or anything newer, there's a built-in way to do this via a wired connection.


Quit QuickTime on your Mac if it is open.
Connect your iPhone, iPad or iPod touch to your Mac via a Lightning or USB-C Cable.
Open QuickTime on your Mac, and select File > New Movie Recording. 
A recording window will appear. Click the arrow next to the Record button, and select your iPhone from the dropdown menu that appears.
Click the Record button and go about your business on your iPhone.
Once you're done, click the Stop button and save the video.