I guess some of them work like the old universal remotes where it can learn the codes needed by pointing the original at it? Depends how configurable the app is for linking commands together, i.e. motor 1 forward/reverse etc.
–
Zhaph - Ben Duguid♦Jun 29 '12 at 8:43

You could do it using a computer as an intermediate. Basically, you have a wireless connection between your iPhone and your computer, then the IR link between the computer and the RCX. It would be technically challenging but not impossible. The IR tower uses a serial port and the protocol is detailed here http://legolab.daimi.au.dk/CSaEA/RCX/Manual.dir/RCXManual.html. The connection between the computer and the mobile device could simply be achieved via wireless connection using TCP sockets and wouldn't have to follow any very specific protocol at all. All of this could be achieved with any number of programming languages, but Python and Visual Basic would likely be the easiest. I could help you write the software to do this if you are very determined, but I only have experience with Windows, so the computer itself couldn't be a Mac.