views:

518

answers:

3

In Snow Leopard there is a possibility to show free/busy time in iCal event. I've searched the headers of CalStore.framework and couldn't find any property that describes this field. How can i retrieve free/busy property of calendar event?

Thanks a lot,

Nava

+1  A: 

Pretty certain there is no public API in Calendar Store for this. You'll have to file a bug requesting it. Alternatives:

  • See if iCal has AppleScript support for the property
  • Use Sync Services which has access to the full iCal schema
Mike Abdullah
Thank you @Mike for answering this. The AppleScript dictionary of iCal doesn't mention this property.The documentation on iCal Schema doesn't relate to it either: http://developer.apple.com/mac/library/documentation/AppleApplications/Reference/SyncServicesSchemaRef/Articles/Calendars.htmlCan it be that Apple still didn't update the documentation?
Nava Carmon
I filed a radar on missing API.
Nava Carmon
A: 

As a hack could you request a CalDav file for the event and parse that?

Jason Tholstrup
sounds interesting. How do i do that? can you provide an example? Thanks
Nava Carmon
You could I believe generate one by having the app export it from AppleScript. Would be very ugly/messy though.
Mike Abdullah
Like I said it would be a hack (and possibly dog slow depending on what you are doing). I just know that it is a documented format and would be one way to do what you want as it appears from other answers that the API is not readily available.Sorry no example, I'm just tossing out ideas at this point.
Jason Tholstrup
Well, as I wrote before, I filed a radar #7358129. Hopefully, it will be fixed in one of next releases. Thanks
Nava Carmon
Filed a duplicate: rdar://7376695
Mike Abdullah
A: 

iCal server has a method of retrieving free/busy, see: http://www.webdav.org/specs/rfc4791.html#rfc.section.7.8.4

However it's not trivial, you will have to essentially write your own API. You issue the server queries using NSURLRequest and NSURLConnection.

christo16