I am capturing an image in my app and what to share it using WHATSAPP by pressing share button like in RETRICA. But i didn't find any way to do it properly. i used UIDocumentInteraction but it didn't work. How can i share it using share extension of WHATSAPP in IOS8.
I got this exception while using UIDocumentInteractionController.
'UIDocumentInteractionController: invalid scheme (null). Only the file scheme is supported.'
this is my code
let image = UIImage(named: "nature")
let path = NSHomeDirectory().stringByAppendingPathComponent("Documents/whatsAppTmp.wai")
UIImageJPEGRepresentation(image!, 100.0)?.writeToFile(path, atomically: true)
let documentInteractionController = UIDocumentInteractionController(URL: NSURL(string: path)!)
documentInteractionController.UTI = "net.whatsapp.image"