Pregunta

I'm trying to open a pdf I generated and saved in my document directory with other applications like ibook with this code:

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];

It seem it has to work fine but when the popover pops ibooks is not in, I have other application but not ibooks. I know the PDF is well formatted because I can open it in preview. Anyone know what I'm doing wrong? I have see a lot of tutorials but not found a solution

¿Fue útil?

Solución

You don't need the UTI, if you have iBooks installed it should appear in the pop up menu, are you sure you have iBooks installed?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top