简体   繁体   中英

Adding PDF to iBooks by code

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.

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.

在这种情况下, UIDocumentInteractionController是你的朋友

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM