Alasdair Allan, author of iOS Sensor Apps with Arduino, has posted the source code for a couple of apps that are based on the Redpark Serial Cable for iOS, which is available in the Maker SHED as part of the Redpark Breakout Pack for Arduino and iOS:
The cable is a fully MFi approved external accessory that allows home-hobbiests to talk to external hardware, no jailbreak required. On one end of the cable is a dock connector that plugs directly into your iOS device. On the other, is an RS-232 serial port that you can easily connect to anything that speaks a serial protocol.
…
I’ve been working with the pre-release version of the cable for a couple of months now and I’ve put up some sample code to get you started. Including a rather nifty Universal application for the iPhone and iPad which will let you directly control an Arduino board. I’ve dubbed it the “Paduino.”
Connect your iPhone to the real world (the source code to the projects are available there as well).
"