I have my iPhone plugged into my computer via USB, I have QuickTime Player open and am previewing my iPhone screen as well as the iPhone's audio, but how would I go about recording my audio from my microphone which is connected to my computer, all in QuickTime? I have tried Audacity, but that didn't work due to lag with QuickTime and that caused the audio to be horrendously out of sync.
Try having two Quicktime recording windows open (one Movie recording--iPhone screen and audio, and one Audio recording for your microphone). Just start the two recording sessions together (they don't have to started at the exact same time, you can edit them later) and then use iMovie or Final Cut Pro to edit the clips so your iPhone audio and visual plays simultaneously with your other audio recording.
You can use the built in screen recorder in your iPhone. If you’re using iOS 11, it will record the sound from whatever source or website, and you can also select mic, and get both audio recordings.
To record your iPhone's screen. Go to Settings app → Control Centre → Customise Controls, and make sure to add Screen Recording to the include list.
Now to record your iPhone's screen, swipe up from the bottom of your screen (swipe down from top right on iPhone X) to open Control Centre.
There is a circle with a solid dot in the middle, just press and hold it, it will open and ask you to record screen and if you want to record audio from the microphone as well.
Once finished, swipe to open Control Centre and tap the same recording button to stop. The recording will be saved to your camera roll.