2

the project I have uses UIDocumentInteractionController to copy/share and image to Instagram, it worked fine for a while.

As soon as I selected the instagram app from the iOS share sheet. the image was open in the select filter section.

Recently, the image is now opened in a view with an x to close and two buttons, one to select stories and another one to select feed, if I select feed, then the camera roll is opened and the last picture is selected or the camera but the image I was sharing from my project disappears. I can not find if there is a change in hooks or the instagram documentation. share sheet opens

instagram app opens the file if feed selected then the file or image is lost and only camera roll is avaiable

4

2 回答 2

0

通过 UIDocumentInteractionController 共享时,我也看到了这种行为,它以前工作正常。Instagram 可能破坏了什么?

NSData *imageData = UIImageJPEGRepresentation(self.image, 1.0);

NSString *writePath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"instagram.igo"];
if (![imageData writeToFile:writePath atomically:YES]) {
    [self activityDidFinish:NO];
    return;
}

NSURL *fileURL = [NSURL fileURLWithPath:writePath];
self.documentController = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
self.documentController.delegate = self;
[self.documentController setUTI:@"com.instagram.exclusivegram"];

// Presentation logic
于 2018-02-05T15:49:32.847 回答
0

Instagram 似乎已在35.0 版中修复了此问题。

于 2018-03-12T10:28:07.360 回答