If you have an iDevice with a Lightning connector running iOS 8 or later and a Mac running Mac OS X Yosemite, you can record video of your iDevice when it's plugged in to your Mac!
Unfortunately the process for doing this is somewhat non-obvious. Your iDevice will show up in QuickTime as a camera. (But nowhere else - this is a QuickTime specific feature. Don't think you can stream your iPhone over Skype or anything like that.)
First, start up QuickTime and then go to File, New Movie Recording.
This will start a new movie recording with your default recording device, which is likely your FaceTime camera. Wave hello to yourself!
Then click the little dropdown next to the record button and change both the camera and the microphone to be your iDevice.
And now you can record your iDevice doing whatever! Yay!
(Fun fact: your status bar will lie while you do this. The time becomes 9:41 AM, your signal strength suddenly becomes five bars with no network name shown, and your battery is suddenly at 100% charge.)
Well, almost. Now for the caveats.
First off, your iDevice will not play sound while recording. So make sure you turn up the volume on Quicktime so the audio will play (with a bit of lag) through your Mac so you can at least sort of hear what's going on.
(Or don’t, if that would be annoying.)
Secondly, whenever you start or stop recording, Mac OS X will act as if you just plugged in your iPhone. (Also when you first select your iDevice as your camera.) Which will cause iTunes/iPhoto to attempt to sync with it. Which is obnoxious.
One last caveat. If you change the orientation of your iDevice in any way, the recording will die. You can change the orientation as much as you want while not recording, but changing the orientation during a recording will stop it. (You won't lose anything you've already recorded, though.)
This is especially obnoxious with games that only run with a landscape orientation, as the home screen requires a portrait orientation. (Except on iPads or the iPhone 6 Plus.) Which means when you launch the game, the recording will instantly stop because the orientation will instantly change.
So be prepared to deal with that.