tags:

views:

888

answers:

4

Hey!

I'm trying to build an in-game Tell A Friend form like in AppStore. Does anybody know if it can be found anywhere in the SDK? I wouldn't like to reinvent the sliced bread.

Thanks!

+1  A: 

There's nothing like this in the SDK, sorry.

Ben Gottlieb
+5  A: 

Short of writing your own SMTP client, you can create a message then exit your app by sending a URL to the mail app with openURL.

NSURL *url = [[NSURL alloc] initWithString: @"mailto:[email protected]?subject=subject&body=body"];
[[UIApplication sharedApplication] openURL:url];

The user then checks the content and sends the message.

Chris Samuels
My answer has now been superseded by changes to the iPhone SDK. Refer to the MFMailComposeViewController class.
Chris Samuels
A: 

As Ben says, no, there's nothing like that in the SDK. My guess is there never will. I imagine that this functionality is implemented on the server side, which is probably the best option anyway.

Stephen Darlington
+2  A: 

In meantime, there are some new API's in the iPhone SDK including the MessageKit.framework. That framework makes it possible to add a MFMailComposeViewController.

Hope that works, Tim

Tim van Elsloo