You can pick up TouchOSC in the App Store for $3.99USD. When you first launch it, you get a configuration panel where you can set your host and communication ports. TouchOSC can both send and receive, so there are two port settings. I used my bonjour address (mbpro.local) as the Host, and the OSC standard (I think) ports : 3333 for outgoing and 8000 for incoming. At the bottom of the configuration panel, you can choose a layout for the controller. I'm working with "Mix 16", but any of the layouts will work with this setup.
OSCulator is the software I used on my MacBook Pro to translate the incoming OSC signals to MIDI controls. OSCulator works with a variety of hardware and software devices, including the Nintendo Wiimote, if you've got one handy. It can interface with any MIDI software or hardware you've got, translating the OSC signals into MIDI controller commands (CC) or notes. Additionally, you can reroute signals as OSC or MIDI, and even trigger AppleScripts.
OSCulator is shareware, and you can choose how much to donate to get a license (minimum $19USD). It will nag incessantly until you buy it, which I tend to frown on, but I quickly found it vital enough to be worth a donation. Once you've got it, registered or not, you can open up the templates found at the TouchOSC site, almost at the bottom of the page under the OSCulator heading. Open the Mix 16 template (or something less complicated, if you choose) in OSCulator, either by double clicking or by using File -> Open. Once the template is open, you'll see a port setting in the upper left corner of the window. Set it to 3333 (or whichever port you chose for "outgoing" in TouchOSC).
By default, the signal indicators in OSCulator are set to light up when receiving. Double check, though, and make sure they're on ... it helps a lot with setup and you can disable them later if they cause a performance hit. The option is on the first panel of the preferences, titled "Flash activity lights." If you haven't already started TouchOSC with the above settings at this point, load it up now. If you're connected properly, you'll see an indicator in the upper right (the Mix 16 configuration works in landscape mode) of the TouchOSC screen, flashing green. Playing around with any of the controllers should light up their associated receiver in OSCulator (scroll down if you're not seeing anything, there are a lot of controls in this one).
Each control is already set up in the template to link to a MIDI CC. That's pretty much all we need to get moving in Logic.
Logic Controller Assignments
This is the tedious part. I was unable to find any ready-to-go templates to do this quickly in Logic, so we have to teach Logic what we want each controller command to do. Fortunately, it's not overly complicated, although it can be a little clumsy. To get started, drag, click or rotate the Logic control you want to associate TouchOSC with first. Under Logic's main application menu, find Preferences -> Control Surfaces -> Learn assignment for "...," where "..." will be the control you last touched. The shortcut for this is Command-L, which is a big timesaver.
The Controller Assignment window will open with "Learn Mode" enabled. Then, just slide, touch or rotate the controller in TouchOSC that you want to associate with this function. A tooltip in Logic will notify you when the signal has been received and its parameters determined. If things look about right, I suggest you immediately turn off Learn Mode in the lower right hand corner of Logic's Controller Assignment window to avoid changing the parameters inadvertently. For most fader controls, you'll want the values set from 0 to 127, and "scaled" with a multiplier of 1.00. For toggles, buttons and other controllers, you'll set the mode appropriately. In most cases Logic will handle this automatically.
Repeat these steps as required to get your TouchOSC controllers associated with Logic functions. A couple dozen iterations later (or however many you think will actually be useful), you've got a control surface which can assist with mixing, transport controls, effects and more. I really like using the XY Pad with a filter effect, assigned to cutoff and resonance, respectively. I also really like being able to have a guitar and requisite microphones set up away from the workstation, and be able to trigger record, undo, return to starting point, etc. without having to fumble for the keyboard from my stool. My iPhone can sit on any nearby surface or music stand and control all of the necessary functions.
Rock and Roll
If nothing else, this will hopefully be some kind of inspiration to incorporate your iPhone into your existing music setup in some fashion. Whether or not you go with TouchOSC, or if you're more inclined to work in something like Ableton Live than Logic, your iPhone can be a great assistant in any digital audio setup. Happy rock and/or rolling.