How to store event in calender in iphone sdk?
===

     EKEventStore *eventDB = [[EKEventStore alloc] init];
    
            EKEvent *myEvent  = [EKEvent eventWithEventStore:eventDB];
    
            NSString *trimmedString = [[arrDateList objectAtIndex:i] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
    
    		myEvent.title     = [d valueForKey:@"garden_name"];
    		myEvent.startDate = [dateFormatter dateFromString:trimmedString];
    		myEvent.endDate   = [dateFormatter dateFromString:trimmedString];
    		myEvent.allDay = TRUE;
    	
    		[myEvent setCalendar:[eventDB defaultCalendarForNewEvents]];
            NSError *err;
            [eventDB saveEvent:myEvent span:EKSpanThisEvent error:&err];

I am using the above line of code but i cant store the event in calender...
please help me where i have mistake in line of code....
Thanks & regards 
Rahul Virja