Yes, it is possible to use the iPhone 3.5 mm (1/8") headphone/mic jack as a data input, as has been demonstrated by the HiJack project - which also powers the input device.
The key, as Dominik Selbold has pointed out, is that the incoming data must be modulated at frequencies within the passband of the iPhone microphone input. Although many have suggested that this limits the data rate, in fact 19 kHz audio is a very wideband signal, capable of dozens of kilobits per second.
For example, in 2008, Jonti Olds demonstrated how using Quadrature Amplitude Modulation at audio frequencies could stream TV sound and picture between two computers,using their audio cards. What would be needed on the iPhone would be to develop a QAM demodulator for the audio input - using the FFT library - to demodulate QAM audio modulated video back into digital video - like H.264 - probably at 1/4 VGA resolution. NTSC Composite video is already QAM, but at a much higher bandwidth; about 5 MHz.
If you search the web for JQAM, you can find Mr. Olds project and code. IMHO, this would be a very cool project to tackle on iPhone or Android.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…