views:

217

answers:

5

Hey Guys

I'm thinking about making a suggestion box for my next iPhone app.

What's the best way to go about this? I was thinking an ModalViewController, a text box that emails out? Are there any other(better ways) to do it? Any expertise would be appreciated.

Update: I read that sending an email from an app is a private api? Will that get the app rejected?

A: 

Maybe this thread will help you:

http://stackoverflow.com/questions/310946/how-can-i-send-mail-from-an-iphone-application

schaechtele
ive looked into those... and not really sorry
Sam Jarman
A: 

In App email isn't a private API. You can use the Message UI Framework for that. This was added in iPhone 3.0 OS SDK.

I would suggest using something like the Three20 library that will give you a screen like this. alt text

For entering a message. From there you can chose to send an email to yourself or to have it post the message to a web server somewhere with XML or JSON.

John Wang
+6  A: 

I would argue that MFMailComposeViewController is the best option for the following reasons:

  1. Since the message will be sent as an email from the user to you, you can easily hit reply to start a dialog with the user, thank them for their feedback, etc. This is much better than an opaque suggestion box that functions as a black hole.

  2. You can prepopulate the message with a subject and body like, "I think your app would be better if: ". You can also include technical details about the user's configuration to help you diagnose support issues. The user can review everything that's being sent, and can edit the information as appropriate.

  3. While the standard mail UI may not be consistent with the rest of your visual design, the user should at least instantly recognize that they're composing an email, which sets their expectations regarding how you'll receive the message, and provides a context that won't leave them wondering how you got their email address if you choose to reply.

  4. After sending the message, the user can be returned to the same point in your application's user experience (unlike mailto:).

  5. Bonus: It's very easy to implement.

cduhn
A: 

Several thoughts:

  • Not everybody has an e-mail account set up. If there is no account set up, you can’t send suggestions using MFMailComposeViewController. On the other hand the system mail composer has the distinct advantage of using the e-mail send queue. The user can send suggestions even though he’s not currently online and the message will get delivered later without you having to worry about a thing.

  • If you want to, you can write whatever UI you like and deliver the message via SMTP using some library such as skpsmtpmessage. (Unlike MFMailComposeViewController that does not require the e-mail account.) You can also do a HTTP POST into a database, which is probably easier than SMTP. The disadvantage of both solutions is that there is no message queue this time and if you want to queue suggestions to be delivered later, you have to write the queue yourself.

I’d probably go with MFMailComposeViewController, the extra time required by other solutions can be usually spent better.

zoul
hmm.. you raise a very valid point... with the whole queue thing... i didnt consider this..I might give the user the option.
Sam Jarman
A: 

If you do not require a return address, you can just HTTP POST the message to your own server and store it in a database. It is as simple as making a UITextView and using NSURLConnection to submit it. If the network is not available, you can save the message until later.

If you want to send an email and need to be 2.x compatible, just compose the message and use [[UIApplication sharedApplication] openURL:] with a mailto:[email protected]&body=message url to yourself.

drawnonward