Jump to content

CaendarStore


dashXcode
 Share

1 post in this topic

Recommended Posts

Hi, I'm playing around with Apple's new framework CalendarStore. But the problem is it's not working! I'm trying to add a new event to iCal. I was successfully to add a new calendar, but when I tried to add a new event it didn't work!

This is my code:

NSError *calError;
CalEvent *event = [CalEvent event];
event.calendar = @"Work";
event.title = @"Calendar Store Test";
event.startDate = [NSDate dateWithNaturalLanguageString:@"3pm October 9, 2007"];
event.endDate = [NSDate dateWithNaturalLanguageString:@"4pm October 9, 2007"];
[[CalCalendarStore defaultCalendarStore] saveEvent:event span:CalSpanThisEvent error:&calError];

In console i found this error message:

*** -[NSCFString isEditable]: unrecognized selector sent to instance 0x3100

 

What's wrong with my code?

Thank you in advancer

Link to comment
Share on other sites

 Share

×
×
  • Create New...