When I use the UIDocumentInteractionController to allow users to share via Instagram, it works, it opens the "open with" and "Instagram" options as one of the options ... the problem is that it also displays many other applications like Facebook "and" Twitter "...
Is there a way to do this, just give the opportunity to open in the instagram application?
Instagram claims there is a way to do this:
http://instagram.com/developer/iphone-hooks/ , but they mention it:
"Alternatively, if you want to show only Instagram in the application list (instead of Instagram plus any other public/jpeg-conforming apps) you can specify the extension class igo, which is of type com.instagram.exclusivegram."but I honestly don't know what this part means, "
extension class igo "
My code is:
UIImage *imageToUse = [UIImage imageNamed:@"imageToShare.png"]; NSString *documentDirectory=[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; NSString *saveImagePath=[documentDirectory stringByAppendingPathComponent:@"Image.ig"]; NSData *imageData=UIImagePNGRepresentation(imageToUse); [imageData writeToFile:saveImagePath atomically:YES]; NSURL *imageURL=[NSURL fileURLWithPath:saveImagePath]; docController = [UIDocumentInteractionController interactionControllerWithURL:imageURL]; docController.delegate = self; docController.annotation = [NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"This is the users caption that will be displayed in Instagram"], @"InstagramCaption", nil]; docController.UTI = @"com.instagram.exclusivegram"; [docController presentOpenInMenuFromRect:CGRectMake(1, 1, 1, 1) inView:self.view animated:YES];

source share