[OGo-MacOSX] Re: iCal parsing using Cocoa/Objc

Helge Hess macosx@opengroupware.org
Mon, 16 Jan 2006 14:27:56 +0100


On 10. Jan 2006, at 09:10 Uhr, Jon Flowers wrote:
> Just a quick question for you. Is there any documentation on how to  
> actually parse a iCal file using the two frameworks you mentioned,  
> SaxObjC and NGiCal?

For SaxObjC you might want to look into the small tutorials on this  
page:
   http://sope.opengroupware.org/en/sope_xml/

For NGiCal we have no real documentation, the files in the samples  
directory should help you to get started:
   http://svn.opengroupware.org/SOPE/trunk/sope-ical/samples/ 
icalparsetest.m

> Is there some simple(ish) code that says I need to do this and this  
> to read an iCal vcalendar file?

Well, the simplest way to get it running would be:

   @interface iCalCalendar
   + (iCalCalendar *)parseCalendarFromSource:(id)_src;

Like:
   id cal = [iCalCalendar parseCalendarFromSource:
               [NSURL fileURLWithPath:@"/tmp/my.ics"]];
   NSLog(@"parsed calendar is: %@", cal);

> Looking through the sope code and project files is a bit  
> overwhelming and was unable to get them to build correctly, but  
> found your latest 4.5.5 version on the web with the frameworks  
> already built.

Not sure whether the framework built already is 100% correct. You  
might want to try to build it with Xcode instead.

Please direct subsequent questions to
   macosx@opengroupware.org
in case they are MacOSX specific (Xcode build issues), or
   developer@opengroupware.org
for generic development issues.

Greets,
   Helge
-- 
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org