在ios 7中分享到Instagram

gtg*_*ola 3 ios ios7

所以我曾经为iOS6提供以下代码片段

NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"];

if([[UIApplication sharedApplication] canOpenURL:instagramURL])
{
    NSURL *imageURL = [NSURL fileURLWithPath:originalImagePath];

    self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:imageURL];
    self.documentInteractionController.delegate = self;
    self.documentInteractionController.UTI = @"com.instagram.exclusivegram";
    [self.documentInteractionController presentOpenInMenuFromRect:self.view.frame inView:self.view animated:YES];
}
Run Code Online (Sandbox Code Playgroud)

但随着iOS7的发布,我得到一个对话框窗口,显示Instagram中的Open图标,我收到以下错误:

Invalid LSOpenOperation request - No applications found to open document

有谁知道Instagram是否已经改变了他们UTI的iOS7或适当的开发人员钩子,使其在7上工作?

gtg*_*ola 6

我的文件扩展名是罪魁祸首.

根据Instagram文档:

您必须先以PNG或JPEG(首选)格式保存文件,并使用文件扩展名".ig".使用iOS文档交互API,您可以触发Instagram打开的照片.

看起来像旧的版本的Instagram没有强制执行(我只是传递.jpg或.png文件)

现在我们必须.ig文件扩展名...