Sharing photos using Twitter’s share extension fails on iOS 10



Hello! I’m working on an iOS app, and users can’t share photos to Twitter using the Twitter app’s share extension. This appears to work fine when the Twitter app is not installed (using the iOS system-provided Twitter integration), but silently fails when the Twitter app is installed. Here’s a little code sample to test this out. Other third-party share extensions work just fine with this, but I can’t tweet the test image.

    NSArray *activityItems = @[[UIImage imageNamed:@"testImage"]];
    UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
    [self presentViewController:avc animated:YES completion:nil];

I have only tested this on iOS 10, running Twitter for iOS version 7.7.