tags:

views:

47

answers:

1

Hello,
I want to do a really simple iPhone app: when I start the app it will launch the Mail app. I found this:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto://[email protected]"]];

But:
- What kind of projet in xcode I have to create (view based application, windows based application) ?
- Then where do I have to put the line of code?

I tried few things, but nothing worked...

Sorry for my stupid question...
Thanks a lot in advance!

A: 
  1. Any project type will do - Use window based for no-nonsense.
  2. applicationDidFinishLaunching:

But it wouldn't hurt to spend some seconds in the documentation!

Eiko
Note that you will have to specifically configure the app to not support multitasking. Otherwise it goes into the background after the first launch and will never work again unless you kill it.
St3fan
It actually might be even better to fire the same behavior when resuming. :-)
Eiko