2

If you view a PDF in Safari, it will show button in the toolbar that reads "Open in iBooks". As far as I know there is the custom URL scheme "itms-books:" for iBooks and that allows passing a file path. iBooks then seems to be able to copy the file from the source app (from anywhere, or only from the personal documents folder?).

How does this work? The only way I'm aware of to share documents with other apps is via UIDocumentInteractionController, but that that is tied to the default popup. Is there a way to transfer files using a custom URL scheme like iBooks does? Or is this some hack only Apple is allowed to use (private API)?

Another way I could think of is to render the controller off screen, loop through it and touch the correct target app by code. Sounds dirty though....

Please note that my intention is not to open something in iBooks but in another app somebody else implemented (that app would be registered for the file types I offer and maybe have a custom URL scheme if required).

Krumelur
  • 32,180
  • 27
  • 124
  • 263
  • Hi krumelur, did u find any solution to it?? – Urmil Setia Dec 03 '12 at 17:05
  • Actually it seems to have changed with iOS6. I registered a test app for all file types. If I view a PDF in Safari, the toolbar in the viewer will now show my app. In addition there is a new type of popover controller in Safari's toolbar where I can open the PDF in all built in apps. – Krumelur Dec 03 '12 at 18:33
  • I'm guessing probably a private API. – SevenBits Jun 24 '13 at 16:33

0 Answers0