every one i am using EKEventStore to add events into iphone calender from my app, its working for the devices of ios version 4.2, and from my application the events are added into ical perfectly but when i installed the same app in ipod with ios version 5, strangely the events are not adding into ical, here is my function to add the events,
-(void)icall_add{
//daily_trackAppDelegate *controller2 =(daily_trackAppDelegate *) [[UIApplication sharedApplication] delegate];
EKEventStore *eventStore = [[EKEventStore alloc] init];
EKEvent *event = [EKEvent eventWithEventStore:eventStore];
event.title = text2.text;
//event.attendees = controller2.who;
event.notes= text3.text;
//controller2.new_event_title = @"";
//controller2.new_recent_location = @"";
event.startDate = mydatepicker.date;
//event.endDate = [[NSDate alloc] initWithTimeInterval:3600 sinceDate:event.startDate];
event.endDate = mydatepicker.date;
[event setCalendar:[eventStore defaultCalendarForNewEvents]];
NSError *err;
[eventStore saveEvent:event span:EKSpanThisEvent error:&err];
daily_trackAppDelegate *controller2 =(daily_trackAppDelegate *) [[UIApplication sharedApplication] delegate];
text1.text = @"";
text2.text = @"";
text3.text = @"";
controller2.who = @"";
controller2.new_event_title = @"";
controller2.new_recent_location = @"";
}
please guide what is that problem n how to solve it, thanx in advance, Regards Saad.
I just check your code, you are adding the start and end date for a new event and saving it. I doubt the start and end date, it cannot be the same, atleast the difference in time is must for a event to occur. Just assign the start and end date with some different time intervals.