Pitch detection in digital audio
Here you find a tutorial on the first steps developing a tuner app. I recommend the .pdf version for readability.

Abstract
A really good tuner shows the user how to tune by being
intuitive. That's where we want to go. Some basics are touched and built on the way;
it would't bother if you have already written „hello world“.
Have fun coding audio, and don't forget to play your guitar!