I've used the original iRig to play my guitars through my iDevices with IK Multimedia's AmpliTube and Apple's GarageBand (free) apps for years. It was a workhorse and a bargain at $39.99, but my one complaint was that it lacked an input gain control, so I had to record some of my guitars at lower-than-I'd-have-liked recording levels. iRig 2,the successor to my venerable iRig shipped last week, fixing my only complaint and adding new features like a 1/4" amplifier output jack, FX/Thru switch, and Android compatibility (not that I care)—all at the same low price ($39.99 - Amazon link). If you want to play your guitar through your iPhone, iPad, or iPod touch, I can't think of a better or more reasonably-priced way to connect it than iRig 2.
Check It Out: iRig 2: New and Improved Mobile Guitar Interface from IK Multimedia