jingsh / JSCalendarManager

An Objective-C class for common calendar and events tasks. Like creating/deleting calendars, creating/updating/deleting events (EKEntityTypeEvent). Requires EventKit.framework.
MIT License
13 stars 0 forks source link

Error when using Set #1

Open engmsaleh opened 9 years ago

engmsaleh commented 9 years ago

When I use the the method setUsingCalendar: to set the current calendar in the below code snippte

        NSArray* currentCalendars = [calendarManager iCloudCalendars];
        for (int i=0; i < currentCalendars.count; i++) {
            if ([[[currentCalendars objectAtIndex:i] title] isEqualToString:[NSString stringWithFormat:@"iPOS %@",currentEmployee.employeeName]]) {
                [calendarManager setUsingCalendar:[[currentCalendars objectAtIndex:i] calendarIdentifier]];
            }
        }

I got the following error

Error getting shared calendar invitations for entity types 3 from daemon: Error Domain=EKCADErrorDomain Code=1013 "The operation couldn’t be completed. (EKCADErrorDomain error 1013.)"

I have search it a bit and it seems a problem on iOS8 with "calendarIdentifier"

jingsh commented 9 years ago

Hi Mohamed,

Thank you for the report. I will look into this issue and discuss with you soon!

engmsaleh commented 9 years ago

@jingsh , I have made a further investigation and it seems be a bug on iOS8 with "calendarIdentifier" , it is originating from sending "calendarWithIdentifier:calendarIdentifier" in the following method in the lib

-(void)setUsingCalendar:(NSString *)calendarIdentifier
{
    if (calendarIdentifier) {
        EKCalendar *cal = [self.eventStore calendarWithIdentifier:calendarIdentifier];

Please double check that

WiKi123 commented 6 years ago

编译无法通过