Meine App generiert ein Bild, das ich mit einem Dokument-Interaktions-Controller und their hook an Instagram übergibt. Oh, das ist iOS 5.1.UIDocumentInteractionController wird nicht in Zielanwendung übertragen
Ich habe die UIDocumentInteraction Aktion Blatt richtig angezeigt, aber das Problem ist, dass, wenn der Benutzer wählen Sie "In Instagram öffnen" das Blatt wird geschlossen und nichts passiert.
Der Code:
// 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];
}
Gedanken?
Es stellte sich heraus, dass dies ein Duplikat von http://stackoverflow.com/questions/9792228/uidocumentsinteractioncontroller-shows-ibooks-but-doesnt-open-it – bretto