I am using UIActivityViewController
to share image. After the WhatsApp recent changes to allow share i am able to see WhatsApp in the share option. I am sharing an
It seems like WhatsApp shares image only when the array contains images and not combination of both image and text.
func shareImage() {
//var messageStr:String = "Check out my awesome iPicSafe photo!"
var img: UIImage = currentPhoto!
//var shareItems:Array = [img, messageStr]
var shareItems:Array = [img]
let activityViewController:UIActivityViewController = UIActivityViewController(activityItems: shareItems, applicationActivities: nil)
activityViewController.excludedActivityTypes = [UIActivityTypePrint, UIActivityTypePostToWeibo, UIActivityTypeCopyToPasteboard, UIActivityTypeAddToReadingList, UIActivityTypePostToVimeo]
self.presentViewController(activityViewController, animated: true, completion: nil)
}