私のアプリは、ドキュメントインタラクションコントローラとtheir hookを使用してInstagramに渡そうとしている画像を生成しています。ああ、これはiOS 5.1を使用しています。UIDocumentInteractionControllerがターゲットアプリケーションに転送していません
私はUIDocumentInteractionアクションシートが正しく表示されていますが、ユーザーが「Instagramで開く」を選択すると、シートは閉じられ、何も起こりません。
コード:
// Method returns a path to the generated image
NSURL *finalCompositePath = [NSURL fileURLWithPath:[self generateFinalImage:@"instagram"]];
UIDocumentInteractionController *documentInteractionController;
NSURL *instagramURL = [NSURL URLWithString:@"instagram://camera"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
//imageToUpload is a file path with .ig file extension
documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:finalCompositePath];
documentInteractionController.UTI = @"com.instagram.exclusivegram";
documentInteractionController.delegate = self;
documentInteractionController.annotation = [NSDictionary dictionaryWithObject:@"Caption Test" forKey:@"InstagramCaption"];
[documentInteractionController presentOptionsMenuFromBarButtonItem:self.ShareButton animated:YES];
}
思考?
これは、これがhttp://stackoverflow.com/questions/9792228/uidocumentsinteractioncontroller-shows-ibooks-but-doesnt-open-itの複製であることがわかりました。 – bretto