0

So I'm using LibGDX and RoboVM to convert my Android project to an iOS app. I'm trying to share an animated GIF that the user has just created and saved to their device, here's what I have so far:

public void shareGif(String path)
{
    NSData data = new NSData(Gdx.files.absolute(path).readBytes());

    NSArray<NSData> nsObjectsToShare = new NSArray<NSData>(data);

    ArrayList<String> excludedActivities = new ArrayList<String>();
    excludedActivities.add(UIActivityType.Print());
    excludedActivities.add(UIActivityType.AddToReadingList());
    excludedActivities.add(UIActivityType.PostToVimeo());
    excludedActivities.add(UIActivityType.PostToTencentWeibo());

    UIActivityViewController share = new UIActivityViewController(nsObjectsToShare, null);
    share.setExcludedActivityTypes(excludedActivities);

    ((IOSApplication)Gdx.app).getUIViewController().presentViewController(share, true, null);
}

Now, this does work. It successfully opens the share window and sends an animated GIF via Mail and Message. Twitter, however, only seems to share a static image (it appears to actually be a JPG when I examine it on my Twitter timeline).

Anyone have any ideas how I can get Twitter to share the ANIMATED version of the GIF? I know I'm not using Objective-C like with typical iOS apps but I'm hoping you can still make out what's going on in the above code.

yesbutmaybeno
  • 1,078
  • 13
  • 31

1 Answers1

-1

Was apparently fixed in iOS 8. Just updated my device and it works now. Cool.

yesbutmaybeno
  • 1,078
  • 13
  • 31