views:

82

answers:

1

Hi guys,

I want to add meta data to an iCal event (task) with OpenMeta. Therefor I need the path to the file that contains the event (task). Is there a possibility to get this programmatically if a have a certain CalCalenderItem?

Thank you very much!

Best, Felix

+1  A: 

The simple answer is you can't. CalendarStore makes no guarantees about where/how it will store the data, only that it will store it.

In practice (at least right now), everything is kept in a SQLite Core Data store. Files for each individual item are then generated for the benefit of Spotlight.

As I understand it, you are wanting to find the location of those Spotlight files and add metadata to them. But even if you do locate them (which there's no API for), when the main store is next updated it will probably overwrite your modified record with a fresh version anyhow, defeating what you want.

Mike Abdullah
You're right of course - looking at the files in ~/Library/Calendars shows the bulk are Spotlight stubs.
Joshua Nozzi
Oh ok, I didn't know that these are only Spotlight stubs. Well good to know that dealing with this files is not a good approach. Thank you very much! :)
Felix Kling