Questions tagged [eventkit]

EventKit is a framework on iOS and OS X which provides classes for accessing and modifying calendar event information.

From the documentation:

The Event Kit and Event Kit UI frameworks together allow applications to access event information from a user’s Calendar database. You can fetch events based on a date range or a unique identifier, receive notifications when event records change, and allow users to create and edit events for any of their calendars. Changes made to events in a user’s Calendar database with Event Kit are automatically synced with the appropriate calendar (CalDAV, Exchange, and so on)

The EventKit framework provides classes for accessing and manipulating calendar events and reminders.

Event Kit not only allows your app to retrieve users’ existing calendar and reminder data, but it also lets your app create new events and reminders for any of their calendars. In addition, Event Kit lets users edit and delete their events and reminders (collectively known as “calendar items”). More advanced tasks, such as adding alarms or specifying recurring events, can be achieved with Event Kit as well. If a change to the Calendar database occurs from outside of your app, Event Kit is able to detect the change by notification so your app can act appropriately. Changes made to calendar items with Event Kit are automatically synced to the associated calendar (CalDAV, Exchange, and so on).

Event Kit provides limited access to a user’s Calendar database; it does not include everything that would be desired for implementing a full-featured calendar or reminder app, such as adding attendees or accounts.

Reference:

1.EventKit Constants Reference

2.EventKit Framework Reference

3.Introduction to Calendars and Reminders

4.EventKit UI Framework Reference

Sample Code:

SimpleEKDemo

567 questions
11
votes
3 answers

How can my app get a list of calendars on user's iPhone

I'm writing an iPhone app that will use the EventKit framework to create new events in the user's Calendar. That part works pretty well (except for the wonky way it handles the timezone -- but that's another issue). What I can't figure out is how…
mpemburn
  • 2,776
  • 1
  • 35
  • 41
11
votes
3 answers

How to get all Events out of a Calendar (Swift)

I am kinda new to Swift, but really interested. I would like to get all the events I stored in a Calendar called "Work" and show them in a tableView. I was looking for questions like this, but the code shown there seems to be kinda old and not…
beginner_T
  • 417
  • 1
  • 6
  • 21
9
votes
1 answer

How to programmatically add calendar subscriptions on iOS?

Via the settings panel of your iPhone, you can add a subscription to a remote .ics calendar format. I have a Dutch iPhone app that does this from within the app (see the screenshot below, "abonneren op de agenda" means "subscribe to the calendar"),…
epologee
  • 11,229
  • 11
  • 68
  • 104
9
votes
1 answer

Create Calendar, no local source even with iCloud off

I am trying to create a Calendar, not a calendar event but a Calendar. I can't get a local source and my app crashes. Here is my code: let newCalendar = EKCalendar(for: .event, eventStore: eventStore) newCalendar.title = "Some Calendar Name" let…
user979331
  • 11,039
  • 73
  • 223
  • 418
8
votes
1 answer

How to test a function/computed property that needs device specific information?

I'm developing a calendar app where I'm struggling to create tests for the functions that utilize the calendars on the users device. The calendar: EKCalendar variable is taken from the users event store so when the unit tests run on XCode's…
Declan McKenna
  • 4,321
  • 6
  • 54
  • 72
8
votes
2 answers

Accessing events in "Events Found in Mail" calendar

I'm trying to access events that are created automatically from emails with the new proactive assistant feature found in iOS 9. The events are displayed in the "Events Found in Mail" Calendar. To access these I am doing the…
Nilsymbol
  • 515
  • 1
  • 9
  • 25
8
votes
1 answer

EKEvent accept invitation

How do you accept an EKEvent invitation in iOS? I know it's possible as Fantastical, Calendars 5, and other calendar apps have this functionality, but I don't see an exposed non read-only property to change the user's status in regards to an…
Kyle Rosenbluth
  • 1,672
  • 4
  • 22
  • 38
8
votes
1 answer

How to decide whether the default EKCalendar 'Calendar' can be hidden?

I'm writing an app that deals with calendars. In the app I'm displaying a list of all available calendars for the user to enable or disable. I'm not using the EventKitUI framework for purposes of my own design and UI. I get a neat list of calendars…
epologee
  • 11,229
  • 11
  • 68
  • 104
7
votes
1 answer

EKEventstore and unique calendar identifier

I have a question about EKCalendar's calendarIdentifier property. Is this ID unique on a global level, or on a per-source level? E.g. can I safely store the calendarIdentifier in my app to smoothly identify a calendar across all calendars in the…
user944943
  • 113
  • 1
  • 2
  • 9
7
votes
2 answers

Getting "Undefined symbols" when trying to use EventKit?

I am trying to use EventKit based around the doco & SimpleEKDemo application, however I am getting the following single error. What does this error mean and what steps would be recommended for troubleshooting (first time I've had such a linking…
Greg
  • 34,042
  • 79
  • 253
  • 454
7
votes
3 answers

How to init my subclass with an instance of its superclass?

In my app I read calendar events of type EKEvent, and I've made an extension with a lot of computed vars so I can easily get the duration, number of man-hours etc. for each event in the calendar. But in large scale, the performance is bad - so I…
Esben von Buchwald
  • 2,772
  • 1
  • 29
  • 37
7
votes
1 answer

EKEventViewController doesn't show event details

I'm currently working in iOS11b6 and the section of my code to open an event in EKEventViewController doesn't show event details - it just shows 'New Event', 'January 1, 2001', 'Untitled Calendar'. The section of my code to display the event is…
Andrew Varvel
  • 1,286
  • 1
  • 10
  • 19
7
votes
0 answers

EventKit Unit testing - stall on main thread

I need to create multiple calendar events for Unit Test in Xcode. The call needs to be async, because of the access rights request: eventStore.requestAccess(to: EKEntityType.event, completion: { granted, error in //create…
Async-
  • 3,140
  • 4
  • 27
  • 49
7
votes
1 answer

Programatically add a reminder to the Reminders app

I'm creating a simple note application and I want to implement Reminders. The user would type a note, tap a button and it would set up a reminder in the Reminders app using the text. Is this possible, and if so, how do I do it? I have seen Apple's…
JDev
  • 5,168
  • 6
  • 40
  • 61
7
votes
1 answer

How to customise EKEventEditViewController

I am using default EKEventEditViewController in my App and I want to customize it, currently it shows all fields that came in default EKEventEditViewController, but I don't want to show URL field and also want to add Timezone field. Can I do that…
Eager Beaver
  • 949
  • 3
  • 11
  • 20
1
2
3
37 38