James Testa
James Testa

Reputation: 2921

How to save the user's email recipients when sending email with UIActivityViewController?

I'm using UIActivityViewController and when the user selects email from the list of options is there a way to save the email recipients that the user inputs?

Do I need to subclass ActivityItemSource as was done here?

I realize getting the email recipients is tricky even with just using MFMailcomposeViewController as in here.

Do I need to subclass MFMailcomposeViewController to save the email recipients that the user inputs?

Upvotes: 0

Views: 675

Answers (1)

lnafziger
lnafziger

Reputation: 25740

From the class reference:

Important: The mail composition interface itself is not customizable and must not be modified by your application. In addition, after presenting the interface, your application is not allowed to make further changes to the email content. The user may still edit the content using the interface, but programmatic changes are ignored. Thus, you must set the values of content fields before presenting the interface.

So, no. You should not subclass MFMailcomposeViewController in order to "steal" the email addresses that the user has entered. This is a privacy issue, and Apple specifically designed it this way. If you try to circumvent this, then your app very likely will be (and should be) rejected.

Upvotes: 2

Related Questions