This bug is fixed by WhatsApp team on 23rd May, 2016 (build no. 2.16.4).
Unable to share NSString object using UIActivityViewControll
Ran into this problem with a custom UIActivityItemSource where I was passing back kUTTypeData
that most providers understand for the dataTypeIdentifierForActivityType
delegate method instead of kUTTypeText
. Simple case overrides fixed the issue in my case. Just another reason the error above could be popping if anyone sees it.
open func activityViewController(_ activityViewController: UIActivityViewController, dataTypeIdentifierForActivityType activityType: UIActivityType?) -> String {
switch activityType {
case UIActivityType(rawValue: "net.whatsapp.WhatsApp.ShareExtension"):
return kUTTypeText as String
default:
return kUTTypeData as String
}
}