You can probably get by with making basic filesystem calls with NSFileManager, since the Kindle itself usually gets mounted as a disk in /Volumes
. You can then pull file metadata that way to get book titles and authors and stuff.
Edit: @Peter Hosey brings a good point:
Note: Don't assume that all mounted volumes are in
/Volumes
. Administrators can mount any device anywhere, fstab may be set up to mount a specific device in a specific place, and Apple could always radically change the file-system layout. UseNSFileManager
'smountedVolumeURLsIncludingResourceValuesForKeys:options:
method or Disk Arbitration to find all of the mounted volumes, wherever they are.
Not sure about managing collections, though. This plugin gives Calibre support for doing so, but it looks to be broken with the Kindle Touch. Collections seem to be a Kindle-proprietary thing that are likely stored in that collections.json
file. Sounds like the Kindle Touch changed the game, though, and you won't be able to manage collections on it (unless Amazon decides to release some sort of SDK to simplify the whole process, but I wouldn't hold my breath).
The Kindle Touch holds its collections file at /var/local/cc.db
, which I'm betting is some sort of SQLite file. Sadly you can only get to it by jailbreaking your Kindle Touch. This tool sounds like it may give you some insight, but since this has changed on the Touch, you're looking at making special cases for collection management based on the device type. Best of luck to you (if you're making a Cocoa-based Kindle manager, I would love to throw money at you when finished)!