2012-03-31 11 views
0

私のアプリは、ドキュメントインタラクションコントローラと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]; 
} 

思考?

+0

これは、これがhttp://stackoverflow.com/questions/9792228/uidocumentsinteractioncontroller-shows-ibooks-but-doesnt-open-itの複製であることがわかりました。 – bretto

答えて

3

UIDocumentsInteractionController shows iBooks but doesn't open itは、円弧を使用しているアプリの正解です。 UIDocumentInteractionControllerはクラスのプロパティでなければなりません。

しかし、また!!!
ios5をサポートしている場合は、保存した画像が「.igo」(.jpgまたは.pngではなく)タイプであることを確認してください。
IOS6はそれをinstagramで開きますが、IOS未満ではIOSはInstagramに進むことなくUIDocumentInteractionControllerを却下します。

+0

すべての拡張機能でこの現象が発生しています7.1 SDKでiOS 6のアプリを開く – cynistersix

関連する問題