ekevent

Deleting an EKEvent from device's calendar using its identifier

拜拜、爱过 提交于 2019-12-21 23:08:20
问题 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

How to add an event in the device calendar using swift

我的未来我决定 提交于 2019-12-17 21:49:35
问题 I would be interested in knowing how to add a calendar event in the device, but using swift. I know there are some examples made in Objective-C, but at the moment nothing in swift. Many thanks. 回答1: Swift 3.0 version let eventStore : EKEventStore = EKEventStore() // 'EKEntityTypeReminder' or 'EKEntityTypeEvent' eventStore.requestAccess(to: .event) { (granted, error) in if (granted) && (error == nil) { print("granted \(granted)") print("error \(error)") let event:EKEvent = EKEvent(eventStore:

How to identify EKEvent uniquely with Sync across the devices

最后都变了- 提交于 2019-12-17 17:28:07
问题 I am trying to make Event Syncing feature for a Project. I need to sync events with the remote server. Let's say I Installed the App in Device A. If I login to another device lets take B, then events synced from A should also appear in Device B, and events of B should also be synced. Now if I again login into the Device A, Events of B should be added. But events previously from A should not again be added to Device A again For this I decided to keep its eventIdentifier on the remote database.

Modifying EKParticipants (attendees) in EventKit like Sunrise

陌路散爱 提交于 2019-12-17 15:43:23
问题 My goal is to add some invitees to an EKEvent . I've looked into other questions like this, such as this one, but all say that it is essentially impossible to add EKParticipant s to an EKEvent programmatically. I do see that the attendees property is read-only, but I see other services like Sunrise using it in their mobile app. I'm confident that they're using some system that at least partially integrates with EventKit because they're pulling in calendars from the user's iCal app. Invites

EKEventEditViewController freezes app and loads after long time

ぐ巨炮叔叔 提交于 2019-12-14 03:26:41
问题 I have the following code in swift: var eventController = EKEventEditViewController() eventController.editViewDelegate = self var store = EKEventStore() eventController.eventStore = store var event = EKEvent(eventStore: store) event.title = viewModel.roleName event.location = viewModel.location event.startDate = viewModel.startDate event.endDate = viewModel.endDate eventController.event = event var status = EKEventStore.authorizationStatusForEntityType(EKEntityTypeEvent) switch status { case

Past events in EKCalendar

橙三吉。 提交于 2019-12-13 17:28:22
问题 I'm trying to get all the events from a determined EKCalendar , but if I call eventsMatching Predicate: with a predicate generated with predicateForEventsWithStartDate:endDate:calendars: and a past ' startDate ' I get a null object. It's a bug? Or there is no way I can retrive the past events? EDIT (NSData decalarations): [[self eventStore] predicateForEventsWithStartDate:[NSDate distantPast] endDate:[NSDate distantFuture] calendars:syncedCalendars] 回答1: Try change your code to to: NSDate*

EKEvent accept event invtation

元气小坏坏 提交于 2019-12-13 01:28:53
问题 I wonder how can I set accept/may be/decline participant status for an EKEvent for which current user has been invited? I can check the participant set but EKEvent found nothing for which I can set its status. 回答1: Status is maintained per each EKParticipant (not on the EKEvent itself), but you can't set it programmatically: [EKParticipant participantStatus] is read only. Per the Apple docs, Event Kit cannot add participants to an event nor change participant information. The closest

How to get a “Done” or “Back” button in an EKEventViewController when no having a navigation bar?

好久不见. 提交于 2019-12-10 17:02:04
问题 I have a list of calendar events in my iOS app, that is to be opened in an EKEventViewController when clicked. Here is my code: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { EKEventViewController *eventViewController = [EKEventViewController new]; eventViewController.event = [self.events objectAtIndex:[indexPath row]]; [self presentViewController:eventViewController animated:YES completion:nil]; } The Event view correctly pops up from the bottom

Deleting an event using Event Kit in iPhone

吃可爱长大的小学妹 提交于 2019-12-08 00:21:21
问题 I am using Event Kit in my iOS application and creating a event using Event Kit. I am able to create it but I want to give the ability to delete also. But I am not able to do that. I know there is a method for EKEventStore to delete event but I am not able to make event object. I have event identifier as a string but I am not able to create an event object using it. Can someone please guide me to do it? Regards Pankaj 回答1: When ever you are creating an event save its id like this: NSString*

Objective c customizing EKEventEditViewController

半世苍凉 提交于 2019-12-07 15:35:34
I am displaying event edit View using this code -(void)editEvent:(EKEvent *)events{ EKEventEditViewController *addController = [[EKEventEditViewController alloc] initWithNibName:nil bundle:nil]; addController.delegate = self; addController.eventStore = [SharedEventStore defaultEventStore]; addController.event = events; [[NSUserDefaults standardUserDefaults] objectForKey:KCalendarIdentifier]]; addController.editViewDelegate = self; addController.navigationBar.barStyle = UIBarStyleDefault; [self.navigationController presentViewController:addController animated:YES completion:nil]; [addController