0

I want to write an application to work with adress books.

My first try is with the apple adress book. My problem is that I didn't found an specification for the format.

I looked a bit about it and found some things out:

  • The adress book is a package (so you can access it like a folder in the file system)
  • In the subfolder Images/ are the avatar images of the contacts as normal jpeg
  • In the subfolder Metadata/ are the contact cards, but in a format I don't know. The MIME is application/octet-stream.
  • The file AddressBook-v22.abcddb seems to be a database with all contacts. My first idea was that it is a sqlite database but I dind't found tables in it.
  • About MailRecents-v4.abcdmr I know nothing.

That's it.

Does someone know where to find a specification? Or how to deal with this adress book?

Best regards, Sebastian

Felix Kling
  • 795,719
  • 175
  • 1,089
  • 1,143

3 Answers3

2

To access Address Book data on Mac OS X you should use the Adress Book framework in your Objective-C application. Instructions on how to use it can be found at Address Book Programming Guide for Mac OS X.

Under no circumstances should you try to access it through the filesystem! The files on disk are considered internal implementation details, and you risk corrupting something if you try to read or write to them directly.

Markus Miller
  • 3,695
  • 2
  • 29
  • 33
1

There is an API for accessing this sort of stuff (taking IT directly from the address book system, so you ars sure to get up to date information), residing, if memory serves, in AddressBook.framework.

Williham Totland
  • 28,471
  • 6
  • 52
  • 68
0

You may also use AppleScript. Open the Script Editor > Open Dictionary > Contacts will give you the API to interact with the Contact database.

gamov
  • 3,789
  • 1
  • 31
  • 28