ekeventkit

Checking for duplicated items before adding new event in iOS - EKEventStore

≡放荡痞女 提交于 2019-12-05 07:11:04
I'm new to iOS programming and I am working on a easy project that lists holidays from a given city and gives users the ability to add those events to the iCal default calendar. The issue is: how to check if there is already an event with same properties (title and start date for example) in the user's calendar. This could happen if the action button (used to add an event to iCal) is pressed more than once. In such a situation, I don't want two or more identical events being created in iCal. I have tried to use NSPredicate but I am totally lost on how to get it sorted. Any help would come be

EKEventStore getting events returns empty list

浪尽此生 提交于 2019-12-04 23:42:25
I want to get all events from a specific calendar in my app. I created the calendar and the test events in my app (needs iOS 5.0 or later for creating custom calendars). If I run the app on my device and then check the system calendar app then my calendar and my created events are shown correctly. Now I want my app to read all those events out of this custom calendar. My events are created with startDate and endDate set to NOW (NSDate alloced with no timeInterval given). NSDate *startDate = [NSDate dateWithTimeIntervalSinceNow:- 60 * 60 * 24 * (365 * 4 + 1)]; NSDate *endDate = [NSDate

Deleting an EKEvent from device's calendar using its identifier

冷暖自知 提交于 2019-12-04 19:14:38
I am creating EKEvent, saving it and saving its identifier as well. I wanna access this identifier and delete the specific Event. I am able to retrieve the proper Identifier from database. However, the Event isn't getting deleted from my Device's calendar. My code to delete the event : `NSError* err; EKEvent *myEvent = [EKEvent eventWithEventStore:homeobj.eventDB]; myEvent = [homeobj.eventDB eventWithIdentifier:[dbObj selectEventIdentifier:mypass]]; [homeobj.eventDB removeEvent:myEvent span:EKSpanThisEvent commit:YES error:&err]; ` For deleting use this code -(void)removeMeWithIndex:(int)index

Open “Event Details” in calendar app with specific event id

半城伤御伤魂 提交于 2019-12-04 01:01:17
问题 I am trying to open calendar with specific event, I have added events programmatically and all the IDs of these event are persistent. This is how i add event -(IBAction)addEvent:(id)sender{ EKEventStore *store = [[EKEventStore alloc]init]; [store requestAccessToEntityType:EKEntityTypeReminder completion:^(BOOL granted, NSError *error) { if (!granted) { return; } EKEvent *event = [EKEvent eventWithEventStore:store]; event.title = @"Demo Title"; NSDateComponents *comps=[[NSDateComponents alloc

How to detect which EKevent was changed

送分小仙女□ 提交于 2019-12-03 21:29:20
问题 I got the problem. I need to know when Events in my EventStore are changed, so for this case I use EKEventStoreChangedNotification but this notification return to me incomprehensible dictionary in userInfo It's look like this: EKEventStoreChangedObjectIDsUserInfoKey = ("x-apple-eventkit:///Event/p429" ); I don't know how I can use this data to taking access for changed object. Please help me 回答1: This will detect changed events and log the event titles over a date range. Although, I ended up

iOS EventKit - Event is not being deleted from calendar

痞子三分冷 提交于 2019-12-01 11:12:55
I'm deleting event using the following code [store requestAccessToEntityType:EKEntityTypeEvent completion: ^(BOOL granted, NSError *error) { if (granted) { EKEvent *event = [store eventWithIdentifier:eventIdentifier]; NSError *eventDeleteError = nil; if (event) { [store removeEvent:event span:EKSpanThisEvent error:&eventDeleteError]; } if (eventDeleteError) { NSLog(@"Event Deletion Error: %@", eventDeleteError); } }]; I got no error in eventDeleteError but following message appear in the console log CADObjectGetInlineStringProperty failed fetching UUID for EKPersistentAttendee with error Error

iOS EventKit - Event is not being deleted from calendar

点点圈 提交于 2019-12-01 08:22:46
问题 I'm deleting event using the following code [store requestAccessToEntityType:EKEntityTypeEvent completion: ^(BOOL granted, NSError *error) { if (granted) { EKEvent *event = [store eventWithIdentifier:eventIdentifier]; NSError *eventDeleteError = nil; if (event) { [store removeEvent:event span:EKSpanThisEvent error:&eventDeleteError]; } if (eventDeleteError) { NSLog(@"Event Deletion Error: %@", eventDeleteError); } }]; I got no error in eventDeleteError but following message appear in the

Open “Event Details” in calendar app with specific event id

こ雲淡風輕ζ 提交于 2019-12-01 03:46:55
I am trying to open calendar with specific event, I have added events programmatically and all the IDs of these event are persistent. This is how i add event -(IBAction)addEvent:(id)sender{ EKEventStore *store = [[EKEventStore alloc]init]; [store requestAccessToEntityType:EKEntityTypeReminder completion:^(BOOL granted, NSError *error) { if (!granted) { return; } EKEvent *event = [EKEvent eventWithEventStore:store]; event.title = @"Demo Title"; NSDateComponents *comps=[[NSDateComponents alloc]init]; [comps setDay:4]; [comps setMonth:10]; [comps setYear:2016]; [comps setHour:12]; [comps

How to detect which EKevent was changed

依然范特西╮ 提交于 2019-11-30 23:56:02
I got the problem. I need to know when Events in my EventStore are changed, so for this case I use EKEventStoreChangedNotification but this notification return to me incomprehensible dictionary in userInfo It's look like this: EKEventStoreChangedObjectIDsUserInfoKey = ("x-apple-eventkit:///Event/p429" ); I don't know how I can use this data to taking access for changed object. Please help me This will detect changed events and log the event titles over a date range. Although, I ended up not doing this because in practice I don't know the date range. I need to compare with all the events I'm

Add participant to an event in iOS

旧时模样 提交于 2019-11-30 09:41:09
In the EKParticipant Class reference, " Send attendees to an EKEvent object to get an array of EKParticipant objects. " OK, buy how can I send attendees to an EKEvent object? Someone give example code? The iOS reference says the following: You do not create EKParticipant objects directly. Send attendees to an EKEvent object to get an array of EKParticipant objects. Unfortunately that attendees property is read-only and the ways that these EKParticipant 's come into existence is omitted from the reference. It has lead me to believe that the only way to create new participants, is by using the