Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Email Recipients in UIActivityViewController In Swift. Is it possible?

Tags:

ios

swift

I want to add a choice to my UIActivityViewController to allow my users to send an email to every single one of their contacts. How can I assign email addresses to the recipient value of a UIActivityViewController's email sharing?

like image 302
anvesh yadav Avatar asked Feb 02 '17 12:02

anvesh yadav


2 Answers

No it is not possible with UIActivityViewController. Recipients can be added only in MFMailComposeViewController. So you should try this instead of UIActivityViewController.

like image 56
Sunil kr singh Avatar answered Oct 22 '22 00:10

Sunil kr singh


You can't prefill this view controller. It is usually used for sharing and the user choses themselves, who they want to email.

You have to use MFMailComposeViewController for custom email prefilling.

like image 37
Alistra Avatar answered Oct 22 '22 00:10

Alistra