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:
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
This is my code:
HTML:
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];
*** -[NSCFString isEditable]: unrecognized selector sent to instance 0x3100
What's wrong with my code?
Thank you in advancer