"This item cannot be shared. Please select a different item." WhatsApp iOS share extension failure message

santhu picture santhu · Apr 13, 2016 · Viewed 13.9k times · Source

This bug is fixed by WhatsApp team on 23rd May, 2016 (build no. 2.16.4).

Unable to share NSString object using UIActivityViewController to WhatsApp.

I tried to share using below code. But once contact is selected from the list, it shows an alert displaying "This item cannot be shared. Please select a different item."

CODE

NSString *shareText = @"Temp text to share";
NSArray *itemsToShare = @[shareText];

UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil];

I am facing this problem after updating WhatsApp to version 2.16.2

Answer

santhu picture santhu · Apr 26, 2016

Received a response from WhatsApp team

- WhatsApp Support -

Hi,

Sorry for the delay! We have received many emails recently, and we do our best to answer them all. Thank you for your patience.

Thank you for informing us about the issue; it will be fixed in a future version of WhatsApp. Unfortunately, we cannot comment on any future timelines, sorry. Thank you for your continued patience and support of WhatsApp.

Cheers, Hans

So, they acknowledge the bug and will fix this in the next release.

Possible Workarounds =>

  • Till then one can use UrlSchemes to share plaintext+url. Follow Spydy's answer.
    OR
  • One can create subclass of UIActivity with activityCategory as UIActivityCategoryShare with whatsapp icon. Then when user selects it, will use urlschemes to share text. For this use JBWhatsAppActivity
    OR
  • Just share NSUrl object for sharing url. Once the fix is done you can revert to sharing plain text and url.