Hi all I am using below code to create an event :
EKEvent *oneLabEvent = [EKEvent eventWithEventStore:eventStore];
oneLabEvent.calendar = eventStore.defaultCalendarForNewEvents;
oneLabEvent.title = [ddEvent valueForKey:@"ddname"];
oneLabEvent.allDay = NO;
oneLabEvent.startDate = [ddEvent valueForKey:@"startDate"];
oneLabEvent.endDate = [ddEvent valueForKey:@"endDate"];
//setting the alarm for the event
EKAlarm * alarm = [EKAlarm alarmWithRelativeOffset:0];
oneLabEvent.alarms = [NSArray arrayWithObject:alarm];
//setting the Reuccurence rule
EKRecurrenceRule * recurrenceRule = [[EKRecurrenceRule alloc]
initRecurrenceWithFrequency:EKRecurrenceFrequencyMonthly
interval:1
end:nil];
if (oneLabEvent.endDate != nil) {
EKRecurrenceEnd * end = [EKRecurrenceEnd recurrenceEndWithEndDate:oneLabEvent.endDate];
recurrenceRule.recurrenceEnd = end;
}else {
oneLabEvent.endDate = oneLabEvent.startDate;
}
oneLabEvent.recurrenceRule = recurrenceRule;
[recurrenceRule release];
NSError *error;
BOOL saved = [eventStore saveEvent:oneLabEvent span:EKSpanThisEvent error:&error];
if (!saved && error) {
NSLog(@"Error while saving the event:%@",[error localizedDescription]);
}
[ddEvent setValue:oneLabEvent.eventIdentifier forKey:@"eventID"];
in my phone it works like a charm but when a friend in his iphone tries modifications to the event He gets this error .
Now can anyone tell me that is anything wrong with my code or is there any calendar settings that can be different from my phone and friend phone .