You’re not supposed to see that anyway
Well, if it isn’t our overprotective mommy again. Sometimes, this Overprotection against technology is comfortable and gives a warm, snuggly feeling. And sometimes, it’s just brain dead. Whatever your personal opinion about iCal may be, you will have to agree that it falls into the latter category. I always suspected as much (at least since I found out that you cannot drag an eMail message from Mail to the ToDo list), but never paid too much attention to it. iCal looks nice, the name is confusing (because iCal is also the abbreviation of the file format it is using), it is simple and does what it should do.
This impression might change if you have to interact with it. Meaning: Exchange data with it. At first, you might be as naive as I am, and think: Well, it’s just a bunch of files. You can read and write them, so what could be the problem?
First of all, this is correct: It is just a bunch of files. The question is: Where are they? On OS X 10.3, they are in ~/Library/Calendars/. On OS X 10.4, every iCal file has its own folder inside ~/Library/Application Support/iCal/Sources, complete with additional files, indices, and a list of all available calendar files.
Supposing you solved the problem of finding the files you want to read from or write to, you will face another one:
iCal reads the calendar files (.ics) only on startup. For everything else, it uses its own, probably indexed, version that is burried somewhere in the caches part of the Library. That means that if your application changes the contents of the file, these changes will not be reflected in the iCal user interface.
Even better: Whenever iCal quits normally, it writes the contents of its own cache file back to the original calendar file, reverting all changes you made to the file.
To be fair, Apple does support synchronization between iCal and other applications through a Synchronization conduit (basically what the iPods are doing). But of course, there is no Java support for this method.
This leaves me with the not very attractive option of using a HTTP server inside a desktop application to export data into a different desktop application running on the same machine. I think I’m kidding, but actually, I’m not sure …
Useful insights. I love to study your article. At all times interesting subjects, plus outstanding research. It is best to be putting a lot of time into your website.