What will happen if I try to open a pdf in iBooks through my app if iBooks is not installed?

StackOverflow https://stackoverflow.com/questions/12410414

  •  01-07-2021
  •  | 
  •  

Question

I've seen from Send PDF to iBooks how to format the link the open the pdf in iBooks, but if iBooks is not installed, will it just open it normally? Or will something break? (I know, I could just test this and find out, but may as well put it up here for anyone else with the same question.)

Was it helpful?

Solution

There are two ways to open a content in another app

1) [UIDocumentInteractionController presentOpenInMenuFromRect]

This will display only available apps. So, iBooks won't be displayed and you won't be able to open pdf in it

2) Usage of custom URL.

Application registers custom URL with the system. So, if iBooks isn't installed and it didn't register custom URL, the call will just fail (I am not sure what kind of error will it return).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top