iOS share extension bug when sharing images?


#1

We’re seeing what may be a bug in the Twitter share extension in version 7.7 of the Twitter app for iOS. We’ve reproduced this issue on an iPhone 7 running iOS 10.3.3 (14G60).

If we pass a UIImage in the items array when initializing the UIActivityViewController, the compose view doesn’t show the image thumbnail and fails to post the tweet. No error is presented in the UI. The completionWithItems handler is called with the completed flag set to true and a nil error. When we pass only a string in the items array, it works as expected. When we pass a string and an image, it fails.

Code snippets:

// This works as expected.
let text = "This is a test."
let vc = UIActivityViewController(activityItems: [text], applicationActivities: nil)

// This doesn’t work. No thumbnail in compose view, no tweet posted, no error presented or returned.
let image = UIImage(named: “foo”)
let vc = UIActivityViewController(activityItems: [image], applicationActivities: nil)

// This also doesn’t work. Same as above.
let text = "This is a test."
let image = UIImage(named: “foo”)
let vc = UIActivityViewController(activityItems: [text, image], applicationActivities: nil)

When the Twitter app is removed from the device, iOS appears to fall back on the system’s share extension, which works as expected for both text and images.


#2

I’m seeing the same behavior with the last iOS Twitter app. Once an image is included, nothing is being posted. Deleting the app uses the system share dialog that works fine.

Please advise.


#3

I have the same problem. This will be even more annoying on iOS 11 when the Twitter sharing features built into the OS are no longer available.


#4

Using"SLComposeViewController" also has same problem.But It’s OK three days ago.Why???


#5

Twitter app was updated Sept. 12.


#6

Would be nice to get an official response from Twitter about this issue.


#7

Will be fixed in next update, according to this thread. Bug in iOS 11?