iPhone 4 earbuds work just fine for listening to in-game audio and for microphone function. However, if you press a button on the earbud mic switch (play button or volume buttons) the mic will stop recording. To fix this, unplug the earbuds and plug them back in.
And iPhone 5 earbuds work just as above, but for some reason when recording audio through the mic it omits a high pitched hum. I have found no way to remedy this. I have tried this on two separate pairs of iPhone 5 earbuds and both have the same problem.
Otherwise they work just fine to listen to in-game audio.
I also tried it with some SkullCandy 'Full Metal Jacket' earbuds and they worked fine for in-game audio and as a mic - just like the iPhone 4 earbuds.