Does anyone know of an app for the iPhone that can analyze sounds and tell us what pitch the sound is?
For example, if i had that app running and i go to the piano and play some notes, it should be able to tell me what notes they are.
Garageband can do this. Open a new (or existing) project and add a new "real" track with no effects. On the bottom edge of the window you´ll see a LCD-like window which usually displays the current time or measure in the track; depending on which version of Garageband you´re using, you can now either use the up-/down-arrows to switch to the tuner (tuning fork symbol) or click on the tuning fork symbol directly to select the tuner. Every sound that is picked up by your Mac´s microphone will now be displayed as note (with off-pitch)
Identifying a single pitch is one thing. Any "tuner" or "guitar tuner" app can do that, as well as any dedicated hardware tuner.
However, analyzing the notes in a chord, or transcribing a musical passage from an audio source in real time, is not something that any existing program can do on any computer platform.
There is a Windows and Macintosh program for electronic music composition and audio recording and editing called Melodyne that can analyze the individual notes in a chord from something that's been recorded, and then let you edit those notes independently.