How to make my own remote control?

I want to literally make my own remote control. Specifically, I want to program my own iphone app that can be a universal remote control for anything I program it to. Surprisingly, I can't find something like that on the app store.

So what do I do? Hell, where do i start? Do I start by somehow figuring out the signal my tv remote sends to my tv and then figuring out how to get my phone to emit that same signal? How would I do any of that?

Google returns dozens of hits. The first one says "find this in the app store"

Your phone needs an infrared port, of course, assuming your TV uses IR. (Our Dell projectors use RF)

You go to the library and research remote control until you become knowledgable enough to write the report you are going to write?