My App being default for a file type

How do I make my app become the default for a file type, and if so, how do I make it interact with my Objetive-C scripts?

Launch Services can do the job:

An example

./myExecutable public.html com.apple.TextEdit

Hope it helps,
ief2