Hi All,
Issue on share the mail client using gmail and yahoo mail. How to solve this issue, please find the below comment and any idea to solve this issues.
- Working perfect in mail client but not working in gmail and yahoo mail.
- Gmail - Shows body as same in subject - issue
Yahoo - Not showing the subject - issue
Mail client - Correct format. Need like this format in google and yahoo.
- I tried many ways but not get any solution. Someone helps how to solve this issue.
- Please find the above screenshots gmail,yahoo and mail client.
- Kindly find the below code and how can i solve this issues.
let objectsToShare:Any?
if let myWebsite = URL(string: webServiceMailUrl + name)
{
objectsToShare = [content,myWebsite] as [Any]
} else
{
objectsToShare = [content] as [Any]
}
let activityVC = UIActivityViewController(activityItems: objectsToShare as! [Any],applicationActivities: nil)
activityVC.setValue(title, forKey: "Subject")
if UI_USER_INTERFACE_IDIOM() == .pad
{
activityVC.popoverPresentationController?.sourceView = view
activityVC.popoverPresentationController?.sourceRect = CGRect(x: CGFloat(view.bounds.size.width / 2), y: CGFloat(view.bounds.size.height / 4), width: CGFloat(0), height: CGFloat(0))
}
activityVC.excludedActivityTypes = [.print, .postToWeibo, .copyToPasteboard, .addToReadingList, .postToVimeo]
present(activityVC, animated: true, completion: nil)