Adding PDF to iBooks by code

4.7k views Asked by At

I was recently asked if I could code a simple IPhone/IPad app that:

  1. Checks an FTP server for changes to a PDF file (easy)
  2. Downloads the lastest PDF (easy)
  3. Adds or replace the file on iBooks (hmm...)

I have tried to find any code that deals with inserting/adding/updating files inside iBooks, but sadly there is very little on the subject. Is this even possible except manually through iTunes? My gut feeling says that it's just a matter of writing the file to a folder..

It makes sense if it were such an API. There are many companies that would like to keep their product portfolios up to date, or research manuals that (in theory at least) could benefit greatly from being updated automatically through an app.

Any help or comments are welcome.

2

There are 2 answers

1
lxt On BEST ANSWER

My gut feeling says that it's just a matter of writing the file to a folder..

Unfortunately, this probably isn't the case. I'd imagine iBooks using some sort of database to keep track of books, rather than simple files.

There is a URL schema for iBooks, but it's undocumented, and nobody has found any methods that would update/replace a book (I don't know if any even exist): How do I launch iBooks e-reader programmatically on iPad?

If you feel this is something that would be beneficial to iBooks, you should consider filing a feature request on the Apple dev site.

6
JustSid On

UIDocumentInteractionController is your friend in this case