iOS 6 addImage returns False


#1

Hello, I apologize if this forum isn’t appropriate for my problem, since I’m only using an SLComposeViewController for my Twitter implementation. I haven’t gotten any answers posting elsewhere, and I hope someone here can help me.

On an iOS 9 device, I’m able to send the tweet fine, same with a facebook share. On an iOS 6 device, I can send it fine on facebook, but with twitter the blue “send” button is disabled. The problem is the image I’m trying to add won’t add for some reason. Here’s my code:

if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
    {
        UIViewController* rootVC = [self getRootViewController];
        SLComposeViewController *tweetSheet = [SLComposeViewController
                                               composeViewControllerForServiceType:SLServiceTypeTwitter];
        [tweetSheet setInitialText: //text

        NSLog(@"Image: %@",image);
        [tweetSheet addImage:image];
        NSLog([tweetSheet addImage:image] ? @"True" : @"False");

        [rootVC presentViewController:tweetSheet animated:YES completion:nil];
    }else {
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"No Twitter Account"
                                                            message: //message
                                                           delegate:self
                                                  cancelButtonTitle:@"Cancel"
                                                  otherButtonTitles:nil];
        [alertView show];
    }

The first log returns: Image: <UIImage: 0x1c5a71f0> and the image even appears correctly in the tweet, but the second log returns False.

Here’s some info on the image:
Kind: JPEG Image
Size: 135 KB
Dimensions: 800 x 800
Color space: RGB
Color profile: sRGB IEC61966-2.1
Alpha channel: No

Can someone please help me work out why this is happening? It’s the last problem I have before I can ship my game. Thank you.


#2

Updating the thread to the REST API since it doesn’t appear that you’re using Fabric.