我正在尝试使用以下代码打开我生成并保存在我的文档目录中的 pdf 以及 ibook 等其他应用程序:
NSLog(@"Send PDF: %@", _pdfPath);
NSURL *url = [NSURL fileURLWithPath:_pdfPath];
docController = [UIDocumentInteractionController interactionControllerWithURL:url];
docController.UTI=@"com.adobe.pdf";
BOOL isValid = [docController presentOpenInMenuFromBarButtonItem:sender animated:YES];
似乎它必须正常工作,但是当弹出窗口弹出 ibooks 不在时,我有其他应用程序但没有 ibooks。我知道 PDF 格式正确,因为我可以在预览中打开它。有人知道我在做什么错吗?我看过很多教程,但没有找到解决方案